Hi

I successfully write my test cases for my application. And I have problem with mouse clicks on the main menu. How do I suppose to do that?
Normal clicks I do like that:
Qt Code:
  1. QTest::mouseClick(lParams->ui->mOk, Qt::LeftButton);
To copy to clipboard, switch view to plain text mode 
And menu clicks I do like that:
Qt Code:
  1. QVERIFY(lMain->ui->mActionDisconnect->associatedWidgets().length());
  2. QTest::mouseClick(lMain->ui->mActionDisconnect->associatedWidgets()[0], Qt::LeftButton);
To copy to clipboard, switch view to plain text mode 
But it seems that it not always work as expected. I have two successfully clicks and one fail. The result is application hangs because application object is deleted in wrong state. Another problem is that menu is not raised and submenu is not visible during test. Please tell me how to simulate mouse clicks on application menu?

thank you