Reputation: 25094
I want to poppulate a QList with QLabel Objects, so i've created a List of QLabel Objects.
QLabel *myLabel;
QList<QLabel> *thumbNails;
but as QList awaits a const QLabel &, how can i append to the Qlist in the right ways, should i use a const_cast ?
Upvotes: 0
Views: 139
Reputation: 4195
Most likely you put your *
in a wrong place, which made thumbNails
a pointer to a QList
.
You should store pointers to QLabel
inside your list. Try this: QList<QLabel*> thumbNails;
Upvotes: 5