calireno
8th October 2009, 09:43
Hi !
I've desperately been trying to get a QList of all the QTableWidgetItem items stored in a QTableWidget for the past few hours but : no luck.
my temporary solution is to select all the items in the table with selectAll() and then run selectedItems() which returns a QList of all the items in my table.
myTable->selectAll();
QList<QTableWidgetItem *> selectedCells = myTable->selectedItems();
I really want to avoid doing this for several reasons, the main one being that it's obviously not the right way to go, but I can't get this to work :
QList<QTableWidgetItem *> allCells = myTable->items( const QMimeData * data);
I don't really understand what "const QMimeData * data" is about and why i can't just get a full QList as easily as the selectedItems() method does.
Any help would be greatly appreciated, i'm loosing my mind on this right now.
Thanks !
Renaud
I've desperately been trying to get a QList of all the QTableWidgetItem items stored in a QTableWidget for the past few hours but : no luck.
my temporary solution is to select all the items in the table with selectAll() and then run selectedItems() which returns a QList of all the items in my table.
myTable->selectAll();
QList<QTableWidgetItem *> selectedCells = myTable->selectedItems();
I really want to avoid doing this for several reasons, the main one being that it's obviously not the right way to go, but I can't get this to work :
QList<QTableWidgetItem *> allCells = myTable->items( const QMimeData * data);
I don't really understand what "const QMimeData * data" is about and why i can't just get a full QList as easily as the selectedItems() method does.
Any help would be greatly appreciated, i'm loosing my mind on this right now.
Thanks !
Renaud