Set tooltip for read-only nested tables

coverity_scan^2
Rob Cutmore 8 years ago
parent 829345257c
commit b59694c4f0

@ -583,13 +583,13 @@ void CSVWorld::EditWidget::remake(int row)
table->resizeColumnsToContents();
if (!editable)
{
// Make table look disabled without actually disabling.
// This allows user to scroll through table without
// being able to edit items.
// Disallow table editing, selection, and focus.
// This allows user to scroll through table but not edit items.
// Disabling table doesn't allow user to scroll.
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
table->setSelectionMode(QAbstractItemView::NoSelection);
table->setFocusPolicy(Qt::NoFocus);
table->setStyleSheet("background-color: whitesmoke");
table->setToolTip("Currently read-only");
}
int rows = mTable->rowCount(mTable->index(row, i));

Loading…
Cancel
Save