after clearing a list cant i append new items next tim???
after clearing a list cant i append new items next tim???
you can... Create items using QTableWidgetItem and create a row using insertRow() and set the items.
nooo i m askin about a Qlist....not table....
yes you can.
try this
Qt Code:
... QList<int> ints; ints << 1 << 2 << 3; qDebug() << ints; ints.clear(); ints << 4 << 5 << 6; qDebug() << ints; ...To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Of course you can!Where's the problem?Qt Code:
QList<int> list; list << 1 << 2 << 3; qWarning() << list; // (1, 2, 3) list.clear(); list << 4 << 5; qWarning() << list; // (4, 5)To copy to clipboard, switch view to plain text mode
Reminds me of the german saying "Zwei Dumme, ein Gedanke." (In English it is I think: Great minds think alike.)...
okay got it...
well i use append function as my QList is like this...
QList<QPair<QString, int> > instructionList; to add items...i hope its correct
Bookmarks