ListButton is similar to Button except that ListButton resizes according to the content size More...
Inherits Item
This element was introduced in qt-components 4.7.
The ListButton component has a label and click event handling. It is similar to a Button except that ListButton resizes according to the content size.
ListButton { text: "Some Text" style: ListButtonStyle {} }
checkable : bool |
Property default is false
If a button's checkable property is set to true, then it can have two alternative checked states, on or off. If the button is checked, then checked is true. The checkable and Button::checked properties are set to false by default.
Button { id: button1 width: 200; height: 50 text: "Checkable" checkable: true onClicked: output = text + " clicked" }
checked : bool |
Property default is false
Specify the checked state. It only works if Button::checkable is set to true
Property default is set from values defined in ButtonStyle
Font styling can be overwritten by setting custom values for e.g. font.pixelSize = 22
iconSource : url |
Property default is ""
The path to the icon image to be used. If you want a different icon for the checked state, you can write:
iconSource: (checked) ? "path to icon checked" : "path to normal icon"
Property default is ButtonStyle{}
Property for styling the component. You can set one of the following style elements:
pressed : bool |
(ReadOnly) Is true when the button is pressed
text : string |
Property default is ""
The text displayed on button.
Signal for detecting button clicks. If the button is pressed, released, then this signal will be emitted.
The signal handler, onClicked(), can bind to state changes or other actions.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.