Change items in a container (e.g. QList)
-
So this means if i have my class derived from QObject, i can only store them as pointers like QList<MyClass *> *list or QList<MyClass *> list ?
-
A, thanks! One more mystery solved)) I already wondered why when i wanted add to MyClass the abilities from QObject something crash down in my program, so i made some workarounds)
Also, just as note.
Most QWidgets takes a parent (another qwidget) in constructor.
It means the parent now owns the child and will delete it when it dies it self.So if you have childs in a list and give them to parents,
the list should Not delete the childs as the parent will. :) -
Yes, but this is stil related to watching for pointers, if they stil good or deleted somewhere else, doesnt it?
BTW, why cant i mark the thread solved?
@Maser
yes watching pointers is always needed :)- BTW, why cant i mark the thread solved?
You might not have asked it as question.
On first post look in topic tools button.
There is "Ask as Question"
Then you can mark it as solved :)
- BTW, why cant i mark the thread solved?