Hi all,
I have a QTableWidget.
When I add QTableItemWidgetItem with the following code:
int index=ui.tbwcategories->rowCount();
ui.tbwcategories->insertRow(index);
itemName->setFlags(Qt::ItemIsUserCheckable);
itemName->setCheckState(Qt::Unchecked);
itemName->setText(query.value(1).toString());
itemName->setToolTip(query.value(2).toString());
ui.tbwcategories->setItem(index,1,itemName);
itemId->setText(query.value(0).toString());
ui.tbwcategories->setItem(index,0,itemId);
int index=ui.tbwcategories->rowCount();
ui.tbwcategories->insertRow(index);
QTableWidgetItem *itemName=new QTableWidgetItem;
QTableWidgetItem *itemId=new QTableWidgetItem;
itemName->setFlags(Qt::ItemIsUserCheckable);
itemName->setCheckState(Qt::Unchecked);
itemName->setText(query.value(1).toString());
itemName->setToolTip(query.value(2).toString());
ui.tbwcategories->setItem(index,1,itemName);
itemId->setText(query.value(0).toString());
ui.tbwcategories->setItem(index,0,itemId);
To copy to clipboard, switch view to plain text mode
I see that inserted item is not enabled, like if it is setEnabled(false) or something alike... it is a right checkbox, but it is not active, not checkable.
In documentation I didn't find anything about this, so here I am...
I rely on you, my masters!
Bookmarks