Gui: [skip ci] fixes: Parameter Editor: Problem resizing columns in right panel

This commit is contained in:
wmayer
2020-05-01 15:24:16 +02:00
parent 259580eaf6
commit 73f42c2aec
2 changed files with 15 additions and 0 deletions

View File

@@ -720,6 +720,20 @@ void ParameterValue::keyPressEvent (QKeyEvent* event)
}
}
void ParameterValue::resizeEvent(QResizeEvent* event)
{
#if QT_VERSION >= 0x050000
QHeaderView* hv = header();
hv->setSectionResizeMode(QHeaderView::Stretch);
#endif
QTreeWidget::resizeEvent(event);
#if QT_VERSION >= 0x050000
hv->setSectionResizeMode(QHeaderView::Interactive);
#endif
}
void ParameterValue::onChangeSelectedItem(QTreeWidgetItem* item, int col)
{
if (isItemSelected(item) && col > 0)

View File

@@ -159,6 +159,7 @@ protected:
void contextMenuEvent ( QContextMenuEvent* event );
/** Invokes onDeleteSelectedItem() if the "Del" key was pressed. */
void keyPressEvent (QKeyEvent* event);
void resizeEvent(QResizeEvent*);
protected Q_SLOTS:
/** Changes the value of the leaf of the selected item. */