Read the docs about QList.
Somewhere soon you will find:
"QList's value type must be an assignable data type. This covers most data types that are commonly used, but the compiler won't let you, for example, store a QWidget as a value; instead, store a QWidget *.
So you need to use the list like this:
HIHQt Code:
QList<Dog*> list; Dog* dog = new Dog(); list.append(dog);To copy to clipboard, switch view to plain text mode
Joh




Reply With Quote
Bookmarks