Reputation: 1491
I am trying to create a "Qt unit test" following this tutorial. I created a new project: Qt Gui Application with a header file as mentioned and a class that contains the test function. I added #CONFIG += testlib
to my ".pro" file
. However, when I run my code, I get this errors:
In function `simulateEvent':
then in function 'mouseEvent':
then in function 'simulateEvent' again:
then in function 'mouseEvent' again:
I could not find any explanation for this as everything looks right . what am I missing ?
Upvotes: 1
Views: 2429
Reputation: 1
I had the same problem. In my case: I used "delete" on an instance of a class what was inherited from QWidget. I had to change the inheritance for my class from QWidget to QObject.
Upvotes: 0
Reputation: 1
Try Qt += declarative, testlib didn't work for me, but declarative did.
Upvotes: 0