mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 09:45:32 +00:00
Set tooltip for read-only nested tables
This commit is contained in:
parent
829345257c
commit
b59694c4f0
1 changed files with 4 additions and 4 deletions
|
@ -583,13 +583,13 @@ void CSVWorld::EditWidget::remake(int row)
|
||||||
table->resizeColumnsToContents();
|
table->resizeColumnsToContents();
|
||||||
if (!editable)
|
if (!editable)
|
||||||
{
|
{
|
||||||
// Make table look disabled without actually disabling.
|
// Disallow table editing, selection, and focus.
|
||||||
// This allows user to scroll through table without
|
// This allows user to scroll through table but not edit items.
|
||||||
// being able to edit items.
|
// Disabling table doesn't allow user to scroll.
|
||||||
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||||
table->setSelectionMode(QAbstractItemView::NoSelection);
|
table->setSelectionMode(QAbstractItemView::NoSelection);
|
||||||
table->setFocusPolicy(Qt::NoFocus);
|
table->setFocusPolicy(Qt::NoFocus);
|
||||||
table->setStyleSheet("background-color: whitesmoke");
|
table->setToolTip("Currently read-only");
|
||||||
}
|
}
|
||||||
|
|
||||||
int rows = mTable->rowCount(mTable->index(row, i));
|
int rows = mTable->rowCount(mTable->index(row, i));
|
||||||
|
|
Loading…
Reference in a new issue