diff options
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 648c63b637..93c8b095e0 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -166,6 +166,7 @@ private slots: void getSetCheck(); void fontPropagation(); void fontPropagation2(); + void fontPropagation3(); void palettePropagation(); void palettePropagation2(); void enabledPropagation(); @@ -819,6 +820,18 @@ void tst_QWidget::fontPropagation2() QVERIFY(child5->font().italic()); } +void tst_QWidget::fontPropagation3() +{ + QWidget parent; + QWidget *child = new QWidget(&parent); + parent.setFont(QFont("Monospace", 9)); + QImage image(32, 32, QImage::Format_RGB32); + QPainter p(&image); + p.setFont(child->font()); + QCOMPARE(p.font().family(), child->font().family()); + QCOMPARE(p.font().pointSize(), child->font().pointSize()); +} + void tst_QWidget::palettePropagation() { QScopedPointer<QWidget> testWidget(new QWidget); |