O'Reilly logo

Computer Vision with OpenCV 3 and Qt5 by Amin Ahmadi Tazehkandi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

GUI testing

Similar to testing classes that perform a specific task, it is also possible to create Unit Tests that are meant for testing GUI functionality or a widget's behavior. The only difference in this case is that GUIs need to be provided with mouse clicks, key presses, and similar user interactions. QTest supports testing GUIs created with Qt by simulating mouse clicks and other user interactions. The following functions are available in the QTest namespace to write Unit Tests capable of performing GUI tests. Note that almost all of them rely on the fact that all widgets and GUI components in Qt are subclasses of QWidget:

  • keyClick: This can be used to simulate clicking a key on the keyboard. This function has many overloaded versions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required