
Originally Posted by
Havard
How do I then use the .append() since it needs an argument, and my class does not take arguments?
QList< Something * > list;
Something * something = new Something();
list.append( something );
// or simply:
list.append( new Something() );
QList< Something * > list;
Something * something = new Something();
list.append( something );
// or simply:
list.append( new Something() );
To copy to clipboard, switch view to plain text mode
Don't forget to delete the items when you remove them from the list (qDeleteAll( list ) might be helpful).
Bookmarks