Obsolete Members for ComboButton

The following members of QML type ComboButton are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.


Property Documentation

collapsedHeight : real

The property holds the height of the component when collapsed. By default the value is the implicit height of the component.

[default] comboList : list<Item>

Property holding the list of items to be shown in the combo list. Being a default property children items declared will land in the combo list.

Note: The component is not responsible for layouting the content. It only provides scrolling abilities for the case the content exceeds the defined expanded height.

[read-only] comboListHeight : real

The property holds the maximum combo list height allowed based on the expandedHeight and collapsedHeight values. It is a convenience property that can be used to size the combo list content.

import QtQuick 2.4
import Lomiri.Components 1.3
import Lomiri.Components.ListItems 1.3
ComboButton {
    id: combo
    text: "Full comboList size"
    ListView {
        anchors {
            left: parent.left
            right: parent.right
        height: combo.comboListHeight
        model: 20
        delegate: Standard {
            text: "Action #" + modelData

See also collapsedHeight and expandedHeight.

expanded : bool

Specifies whether the combo list is expanded or not. The default falue is false.

expandedHeight : real

The property holds the maximum height value the component should expand. When setting the property, remember to take into account the collapsedHeight value. The best practice is to use bind it with collapsedHeight.

ComboButton {
    text: "altered expandedHeight"
    expandedHeight: collapsedHeight + units.gu(25)

A value of -1 will instruct the component to expand the combo list as much as its content height is.

The default value is collapsedHeight + 19.5 GU, so at least 3 ListItems can fit in the combo list.

See also collapsedHeight.

font : font

The font used for the button's text.

iconPosition : string

The position of the icon relative to the text. Options are "left" and "right". The default value is "left".

If only text or only an icon is defined, this property is ignored and the text or icon is centered horizontally and vertically in the button.

Currently this is a string value. We are waiting for support for enums: https://bugreports.qt-project.org/browse/QTBUG-14861