を含む QT アプリケーションの単体テスト ケースを作成していますQWizard
。フレームワークを使用していQtTest
ます。しかし、ウィザード ページで [次へ] ボタンをクリックすることができません。
welcomePage->m_installedVersion->lineEdit()->setText("1102");
welcomePage->m_upgradeVersion->lineEdit()->setText("12");
welcomePage->completeChanged(); //Only the above two text fields are mandatory so Next button should be enabled here, but it is not. So I have manually enabled it below.
myWizard.getNextButton()->setEnabled(true);
while( !myWizard.getNextButton()->isEnabled())
{
}
//Trying different ways to click on Next
QTest::mouseClick(myWizard.getNextButton(), Qt::RightButton, Qt::NoModifier, QPoint(), 5000);
QSignalSpy(myWizard.getNextButton(), &QPushButton::clicked);
myWizard.getNextButton()->click();
2ページ目はinitializePage
呼び出されないので、Nextボタンは押されていないと思います。単体テスト中に次のページに移動するにはどうすればよいですか?