Qt Reference Documentation

QML ButtonColumn Element

Provides a component for arranging a set of buttons in a column. More...

This element was introduced in Qt Quick Components 1.0.

Properties

Detailed Description

The ButtonColumn component is a container for buttons and items with the checked property. It makes the child items equal-sized and arranges them in a vertical column. By default ButtonColumn's RadioButton and checkable button components are mutually exclusive. ButtonColumn provides the same functionality as ButtonRow with the exception that no separate segmented- style graphics are available for Button and ToolButton in ButtonColumn.

Creating a ButtonColumn

The code snippet below illustrates how to create a ButtonColumn component that contains four buttons with icons. The ButtonColumn's exclusive property is not set, so it is true by default, and thus its child buttons are checkable. In addition, the checkedButton property is not set, so the first button is set to checked by default.

     ButtonColumn {

         Button {
             iconSource: "list1.svg"
         }

         Button {
             iconSource: "list2.svg"
         }

         Button {
             iconSource: "list3.svg"
         }

         Button {
             iconSource: "list4.svg"
         }
     }

The screenshot below illustrates the result of the code snippet.

See also ButtonRow.

Property Documentation

checkedButton : Item

Defines which button in the ButtonColumn is checked.


exclusive : bool

Indicates whether or not the ButtonColumn's buttons are mutually exclusive, that is, only one button can be checked at a time. If the exclusive value is true, the buttons are checkable and mutually exclusive; otherwise not.

The exclusive property is true by default.