Span property group headers across all cells to avoid text truncation

Render the background of property value editor widgets to avoid cell contents showing through the editor
This commit is contained in:
Travers Carter
2017-11-23 20:45:29 +11:00
committed by wmayer
parent e8587cf0b4
commit c71b579f97
2 changed files with 6 additions and 0 deletions

View File

@@ -203,6 +203,10 @@ void PropertyEditor::setEditorMode(const QModelIndex & parent, int start, int en
if (propItem && propItem->testStatus(App::Property::Hidden)) {
setRowHidden (i, parent, true);
}
if (propItem && propItem->isSeparator()) {
// Set group header rows to span all columns
setFirstColumnSpanned(i, parent, true);
}
}
}

View File

@@ -122,6 +122,8 @@ QWidget * PropertyItemDelegate::createEditor (QWidget * parent, const QStyleOpti
if (!childItem)
return 0;
QWidget* editor = childItem->createEditor(parent, this, SLOT(valueChanged()));
if (editor) // Make sure the editor background is painted so the cell content doesn't show through
editor->setAutoFillBackground(true);
if (editor && childItem->isReadOnly())
editor->setDisabled(true);
else if (editor && this->pressed)