Solved QList append Object between
-
Hi,
me again. I want to know if there is a Possibility to append an Object in a QList between Values. So if i pop_back 2 Values and insert the new Object in the QList at this Position. Is that possible?
-
hi
The Qlist is a template class.
So you can insert any type into it. but they must all be same type.So you cannot insert 2 ints and then an Object.
it can be ints or Object.But maybe if u explain what you want with more details, we can find solution.
-
QList::insert()
-
@JKSH
You read better than me :)
I thought he wanted to mix types. (doh) -
insert is it? No i have the same Objects, but want to insert an Object into a QList betweens 2 Values. I try it later.
-
@Fuel You can find all needed information in the documentation:
http://doc.qt.io/qt-5/qlist.html#insert
http://doc.qt.io/qt-5/qlist.html#insert-1