Hi,
How to unit test qt GUI events (keypress, keyrelease,mouseclick)?
I already gone through http://doc.trolltech.com/4.6/qtestli...reating-a-test
Are there any reference material/samples to start with event testing?
Thanks
Vels
Hi,
How to unit test qt GUI events (keypress, keyrelease,mouseclick)?
I already gone through http://doc.trolltech.com/4.6/qtestli...reating-a-test
Are there any reference material/samples to start with event testing?
Thanks
Vels
vels (23rd April 2010)
Hi,
I am using keypress event on mywindow
Qt Code:
void TestGui::testGui() { QMainWindow mywindow; QTest::keyPress(&mywindow, Qt::Key_Backspace); //how to verify keypress event }To copy to clipboard, switch view to plain text mode
how to verify the event?
Thanks
Vels
What do you mean by "verify" in this context? I don't know what the backspace key is supposed to do in your case but you have to use the API of your window class to check if it did that. Use the macros provided by QTestLib for the comparison itself.
vels (23rd April 2010)
Bookmarks