Gui: Process comments DWG expression dialog

This commit ensures that the buttons stay at the end of the dialog.
This commit is contained in:
Pieter Hijma
2025-08-18 12:10:49 +02:00
parent 7f758606bf
commit 7bce610ef5
2 changed files with 51 additions and 63 deletions

View File

@@ -227,6 +227,8 @@ void DlgExpressionInput::initializeVarSets()
comboBoxGroup.setInsertPolicy(QComboBox::InsertAtTop);
comboBoxGroup.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
DlgAddPropertyVarSet::setWidgetForLabel("labelGroup", &comboBoxGroup, ui->formLayout);
setTabOrder(ui->comboBoxVarSet, &comboBoxGroup);
setTabOrder(&comboBoxGroup, ui->lineEditPropNew);
std::vector<App::VarSet*> varSets = getAllVarSets();
if (!varSets.empty() && typeOkForVarSet()) {
@@ -742,6 +744,7 @@ void DlgExpressionInput::onCheckVarSets(int state) {
}
else {
okBtn->setEnabled(true); // normal expression
adjustSize();
}
}

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>414</width>
<height>291</height>
<height>252</height>
</rect>
</property>
<property name="sizePolicy">
@@ -29,6 +29,9 @@
<property name="spacing">
<number>3</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
</property>
<property name="margin" stdset="0">
<number>0</number>
</property>
@@ -166,23 +169,10 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxVarSets">
<property name="text">
<string>Add to Variable Set</string>
<string>Store in VarSet...</string>
</property>
</widget>
</item>
@@ -193,60 +183,56 @@
<property name="title">
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="2" column="0">
<widget class="QLabel" name="LabelPropNew">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelGroup">
<property name="text">
<string>Group</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelVarSet">
<property name="text">
<string>Variable Set</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditPropNew">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxVarSet"/>
</item>
</layout>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelVarSet">
<property name="text">
<string>Variable Set</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxVarSet"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelGroup">
<property name="text">
<string>Group</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="LabelPropNew">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditPropNew">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
@@ -259,7 +245,6 @@
</customwidgets>
<tabstops>
<tabstop>expression</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<connections>