summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 42f496a..dfd0792 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -343,6 +343,7 @@ private slots:
void paintOutsidePaintEvent();
#endif
void updateOnDestroyedSignal();
+ void toplevelLineEditFocus();
private:
bool ensureScreenSize(int width, int height);
@@ -8727,5 +8728,18 @@ void tst_QWidget::updateOnDestroyedSignal()
QTest::qWait(200);
}
+void tst_QWidget::toplevelLineEditFocus()
+{
+ testWidget->hide();
+
+ QLineEdit w;
+ w.show();
+ qt_x11_wait_for_window_manager(&w);
+ QTest::qWait(200);
+
+ QCOMPARE(QApplication::activeWindow(), &w);
+ QCOMPARE(QApplication::focusWidget(), &w);
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"