Hi at all,
I'm trying to simply set a QString in a QTableWidgetItem.
ui->tableWidget->item(0,0)->setData(Qt::DisplayRoleRole,"foo");
ui->tableWidget->item(0,0)->setData(Qt::DisplayRoleRole,"foo");
To copy to clipboard, switch view to plain text mode
But when I do this the little app crashes.
Instead, if I write something before in the same cell by myself, the setData works out.
It sounds like the item object isn't still created when I try to setData. When I before write something in the same cell trought the GUI, the object is created and the the setData istruction works.
Any Idea? that's real strange.
Sorry for my english 
Gianluigi
Bookmarks