plan_rich
21st September 2010, 11:17
Hi!
I recently programmed some qt and stumbled over the problem, that i cannot add my own class derived from QObject into a QList.
See two examples in attachments!
This code is not very useful but it was just a test to make sure that i made something wrong!
Dog is a simple class with 1 function.
When it is a normal class then i can add it to my QList without a problem.
But if i extend dog from QObject i cannot add it to a QList!
Can someone help me?
I used cmake to compile my examples!
I recently programmed some qt and stumbled over the problem, that i cannot add my own class derived from QObject into a QList.
See two examples in attachments!
This code is not very useful but it was just a test to make sure that i made something wrong!
Dog is a simple class with 1 function.
When it is a normal class then i can add it to my QList without a problem.
But if i extend dog from QObject i cannot add it to a QList!
Can someone help me?
I used cmake to compile my examples!