tried in many ways, but always occurs Segmentation fault.
Qt Code:
while (i < pa.count()) { im[i] = pa[j]; i++; j +=2; }To copy to clipboard, switch view to plain text mode
there is no way in Qt?
tried in many ways, but always occurs Segmentation fault.
Qt Code:
while (i < pa.count()) { im[i] = pa[j]; i++; j +=2; }To copy to clipboard, switch view to plain text mode
there is no way in Qt?
Last edited by jaca; 16th May 2008 at 21:56.
You have to resize the list or use append() to insert items and the indexes of the list have to be a sequence. If you want only odd index numbers, use QMap.
Qt Code:
int index = 1; QStringList inlist; QMap<int, QString> out; out[index] = str; index+=2; }To copy to clipboard, switch view to plain text mode
tried this code:
Qt Code:
QMap<int, QString>::const_iterator i = out.constBegin(); while (i != out.constEnd()) { cout << i.key() << ": " << i.value() << endl; ++i; }To copy to clipboard, switch view to plain text mode
Only I could not show values. As I see the values of QMap?
Thanks.
Last edited by jaca; 16th May 2008 at 21:55.
Do you have console support enabled? I suggest using QMessageBox instead of cout to be sure.
Bookmarks