Skip to content

Commit

Permalink
fixedWidth in Dropdown should be settable
Browse files Browse the repository at this point in the history
the fixedWith property is set if the fixedWidth is set, but this does not work when a DropDown is in a ComponentsList. In this case just set the fixedWidth to true, to force the DropDown to get always the same width.
  • Loading branch information
boutinb committed Dec 2, 2024
1 parent 119dd1f commit 505819c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion QMLComponents/controls/comboboxbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ComboBoxBase : public JASPListControl, public BoundControlBase
Q_PROPERTY( QString startValue READ startValue WRITE setStartValue NOTIFY startValueChanged )
Q_PROPERTY( QString currentColumnType READ currentColumnType NOTIFY currentColumnTypeChanged )
Q_PROPERTY( QString currentColumnTypeIcon READ currentColumnTypeIcon NOTIFY currentColumnTypeIconChanged )
Q_PROPERTY( bool fixedWidth READ fixedWidth NOTIFY fixedWidthChanged )
Q_PROPERTY( bool fixedWidth READ fixedWidth WRITE setFixedWidth NOTIFY fixedWidthChanged )

public:
ComboBoxBase(QQuickItem* parent = nullptr);
Expand Down Expand Up @@ -80,6 +80,7 @@ protected slots:
void activatedSlot(int index);

GENERIC_SET_FUNCTION(StartValue, _startValue, startValueChanged, QString )
GENERIC_SET_FUNCTION(FixedWidth, _fixedWidth, fixedWidthChanged, bool )

protected:
bool _checkLevelsConstraints() override;
Expand Down

0 comments on commit 505819c

Please sign in to comment.