Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
How to unit test the code inside the paintEvent(QPaintEvent *)
I have no idea how can i do the unit test on the paintEvent function that is override.
Kindly suggest any ideas or opinions.
What does happen in that paint event that you want to test ?
In the paintEvent, just draws simple drawings like a circle. So i want to test if the drawing is actually drawn i.e. paintEvent function is executed or not.
Since you know what is rendered, you can dump the result and check that the resulting image is not blank.
Thanks for the reply.
I was able to use this approach to solve the problem by storing the image and later compare the image stored.