mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-28 19:31:32 +02:00
Set the item non-editable (view only), and non-selectable
--HG-- branch : feature
This commit is contained in:
parent
1608599795
commit
7450ddf790
|
@ -115,6 +115,12 @@ void VWidgetDetails::FillTable(const QHash<quint32, VDetail> *details)
|
|||
|
||||
item = new QTableWidgetItem(name);
|
||||
item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
|
||||
// set the item non-editable (view only), and non-selectable
|
||||
Qt::ItemFlags flags = item->flags();
|
||||
flags &= ~(Qt::ItemIsEditable); // reset/clear the flag
|
||||
item->setFlags(flags);
|
||||
|
||||
ui->tableWidget->setItem(currentRow, 1, item);
|
||||
++i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue