I have a QT application and I want to test it with QTest. Shortly about what I wanna do: I have a Main Window, where the button Settings is located. If I click on this button, the QDialog is appeared. I want to test if this really happens
MainWindow mwindow;
QTest::mouseClick(mwindow->showButton, QtCore::Qt::LeftButton)
and then I would check for presence of text in new dialog and so on.
The dialog appears but - how do I close it within the test without closing it manually? And how do I test for text presence in it. If I got it right, I can't do anything in test while the dialog is shown.
What am I doing wrong?