Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QComboBox

A combo box/ dropdown widget which allows the user to select one of multiple preset values. Qt documentation: QComboBox

Hierarchy

Index

Constructors

constructor

Properties

currentIndex

currentIndex: number

Index into the list of possible values that the user has selected.

currentIndexChanged

currentIndexChanged: Signal<number>

Signal emitted when the user selects a different option. Provides the index into the list of values for the new selection.

warning

When Tiled is compiled against Qt 5, the index parameter is the chosen text rather than the actual index. Use QComboBox.currentIndex to get the selected index.

currentTextChanged

currentTextChanged: Signal<string>

Signal emitted when the user selects a different option. Provides the string value of the selected option.

enabled

enabled: boolean

If false, the widget cannot be interacted with. Qt documentation: QWidget::enabled

minimumHeight

minimumHeight: number

You can use this property to prevent the widget from being resized to a height below this amount.

minimumWidth

minimumWidth: number

You can use this property to prevent the widget from being resized to a width below this amount.

styleSheet

styleSheet: string

Set this property to override the style sheet for this widget.

See https://doc.qt.io/qt-6/stylesheet.html and https://doc.qt.io/qt-6/stylesheet-examples.html for more information.

toolTip

toolTip: string

The toolTip displayed when the user mouses over this widget

visible

visible: boolean

Controls whether this widget is visible. When toggling this property, the dialog layout will automatically adjust itself based on the visible widgets. Qt documentation: QWidget::visible;

Methods

addItems

  • addItems(texts: string[]): void
  • Adds the given items to the combo box.

    since

    1.10

clear

  • clear(): void
  • Removes all items from the combo box.

Generated using TypeDoc