I am trying to write a unit test for a GUI application using the QTestLib. The problem is that one of the slots creates a file dialog using exec() and I found no possibility to interact with the dialog.
The slots which creates the dialog is connected to a QAction. So the first problem is that the test blocks when I trigger the QAction in the test since this results in the call to exec().
Here is my code snip
QActoin* currentActoin;
if(currentAction->text() == action)
{
currentAction->trigger();
..........
}
Here once i triggered the action, it opens the file dialog which needs manual intervention to return to program. How can i come back to test code without manual intervention? i.e How can i get the handler (pointer) to the file dialog? How can set value for the file dialog?