frame.setLayout(layout);
frame.show();
- QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
+ QVERIFY(QTest::qWaitForWindowActive(&frame));
widget->setFocus();
QApplication::processEvents();
QCursor::setPos(QPoint(0,0));
#endif
- QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
- QTest::qWait(60);
+ QVERIFY(QTest::qWaitForWindowActive(&frame));
//move the mouse inside the widget, it should be colored
QTest::mouseMove ( widget, QPoint(6,6));
QTest::qWait(60);
QWidget* widget = widgets[c];
widget->show();
- QTest::qWaitForWindowShown(widget);
+ QVERIFY(QTest::qWaitForWindowExposed(widget));
QImage image(widget->width(), widget->height(), QImage::Format_ARGB32);
widget->render(&image);
tabWidget.addTab(new QLabel("tab1"),"tab1");
tabWidget.resize(QSize(400,400));
topLevel.show();
- QTest::qWaitForWindowShown(&tabWidget);
- QTest::qWait(50);
+ QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QTabBar *bar = qFindChild<QTabBar*>(&tabWidget);
QVERIFY(bar);
//check the tab is on the right
layout.addWidget(new QGroupBox("some text", &w));
w.show();
- QTest::qWaitForWindowShown(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
//workaround the fact that the label sizehint is one pixel different the first time.
label.setIndent(0); //force to recompute the sizeHint:
w.setFocus();
frame.setLayout(layout);
frame.show();
- QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
+ QVERIFY(QTest::qWaitForWindowActive(&frame));
foreach (QWidget *widget, widgets) {
widget->setFocus();
QApplication::processEvents();
frame.setLayout(layout);
frame.show();
- QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
spinbox->setFocus();
- QApplication::processEvents();
+ QVERIFY(QTest::qWaitForWindowActive(&frame));
QImage image(frame.width(), frame.height(), QImage::Format_ARGB32);
frame.render(&image);
w = new Widget();
w->show();
- QTest::qWaitForWindowShown(w);
+ QVERIFY(QTest::qWaitForWindowExposed(w));
delete w;
qApp->setStyleSheet(QString());
}
} w;
w.setStyleSheet("* { background-color: white; color:black; border 3px solid yellow }");
w.show();
- QTest::qWaitForWindowShown(&w);
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
}