Hi,

I'm trying to put the contents of a QTreeWidget in a QMultiMap but when I'm checking the result it seems only the first row had been inserted.
Here's my code:
Qt Code:
  1. QMultiMap<int, QString> mainInputWidget::returnTravelTableData()
  2. {
  3. QMultiMap<int, QString> rowStrings;
  4. for (int row = 0; row < ui.MItravelTreeWidget->topLevelItemCount(); ++row)
  5. {
  6. for (int column = ui.MItravelTreeWidget->columnCount() - 1; column >= 0; --column)
  7. {
  8. qDebug() << "column" << column;
  9. qDebug() << "row" << row;
  10. rowStrings.insert(row, ui.MItravelTreeWidget->itemAt(row,column)->text(column));
  11. }
  12. }
  13. return rowStrings;
  14. }
To copy to clipboard, switch view to plain text mode 
The loops are working right according the qDebugged row and column values, but the problem is with
Qt Code:
  1. ui.MItravelTreeWidget->itemAt(row, column)
To copy to clipboard, switch view to plain text mode 
It keeps pointing to the first row.
Probably I'm not using this function correctly. What should I do different or is there another solutions that works as well?

Thanks for answering.