MotorXP-AFM Scripting API
    Preparing search index...

    Class QComboBox

    Combo box for choosing one of the predefined options.

    Hierarchy (View Summary)

    Implements

    Index
    • Creates a QComboBox with the specified parent widget.

      Parameters

      • Optionalparent: Object

        Parent widget.

      Returns QComboBox

    count: number

    Number of items in the combo box.

    Read

    currentData: any

    Current item data (userData), supplied as the second argument to addItem().

    Read only

    currentIndex: number

    Sets the current index.

    Read/Write

    currentIndexChanged: SignalConnector<string>

    Signal emitted when the selected item changes. The handler receives the new item's text (the Qt 5 currentIndexChanged(QString) overload), not its index: read currentIndex for the index and currentData for the data.

    Read

    currentText: string

    Currently displayed text in the combo box.

    Read/Write

    enabled: boolean
    maximumHeight: number
    maximumWidth: number

    Maximum widget width in pixels.

    Read/Write

    minimumHeight: number

    Minimum widget height in pixels. Sets the lower limit of the label height.

    Read/Write

    minimumWidth: number
    objectName: string

    Unique object name used for lookup and styling.

    Read/Write

    styleSheet: string

    Widget style sheet (see QtWidgets.style*()).

    Read/Write

    toolTip: string
    visible: boolean
    • Adds an item to the combo box.

      Parameters

      • text: string

        Text displayed for the item.

      • OptionaluserData: any

        Additional data associated with the item.

      Returns void

      Write

    • Blocks or unblocks signals from the object. While blocked, signals do not invoke connected handlers.

      Parameters

      • block: boolean

        True to block signals; false to unblock them.

      Returns boolean

      Previous signal-blocking state.

      Write

    • Removes all items from the combo box.

      Returns void

      Write

    • Finds an item by associated data (userData) and returns its index. Returns -1 if the item was not found.

      Parameters

      • data: any

        Data to compare with each item's userData.

      Returns number

      Index of the found item, or -1.

      Read

    • Finds an item by text and returns its index, or -1 if not found.

      Parameters

      • text: string

        Item text.

      Returns number

      Index of the found item, or -1.

      Read

    • Hides the widget.

      Returns void

    • Returns the data (userData) associated with the item at the specified index.

      Parameters

      • index: number

        Item index.

      Returns any

      Data associated with the item: the second argument previously passed to addItem.

      Read

    • Returns the item text at the specified index.

      Parameters

      • index: number

        Item index.

      Returns string

      Item text.

      Read

    • Sets the current item index.

      Parameters

      • index: number

        Item index.

      Returns void

      Write

    • Enables or disables the widget.

      Parameters

      • enabled: boolean

        True to enable; false to disable.

      Returns void

    • Sets widget visibility.

      Parameters

      • visible: boolean

        Visibility flag: true to show, false to hide.

      Returns void

    • Shows the widget.

      Returns void