I am new to Qt and unit testing. I have gone through the documentation and example of unit testing, but i couldnt figure out how to use the test scenario's in an application.
For eg. In the documentation a QLineEdit is created and then the value is checked with a specific value.
void testGUI()
{
QLineEdit lineEdit;
QTest::keyClicks(&lineEdit, "Hello");
QCOMPARE(lineEdit.text(),QString("Hello"));
}
When i run the program all the result is shown in the console.
But how can i check if i have a QLineEdit and a QPushButton in a QMainWindow form.
How to do GUI Testing ?