Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!
A button with an icon as visual representation. More...
Import Statement: | import Felgo 3.0 |
Since: | Felgo 2.7.0 |
The IconButton is a special button type that shows an Icon as visual representation. It can be used with a default button behavior or as a toggle button
(setting the toggle property to true
).
You can use the IconButton as a toggle like this:
IconButton { // Icon in default state icon: IconType.hearto // Icon in selected state selectedIcon: IconType.heart toggle: true onToggled: { console.debug("Button toggled") } }
color : color |
The color to use for this button in default state. The default value is Theme::tintColor.
disabledColor : color |
The color to use for this button when the button is disabled. The default value is Theme::disabledColor.
This property was introduced in Felgo 2.12.0.
selected : bool |
The current toggle state of the button is toggle property is set to true
.
You can set this property from your own logic to set the initial state of the button.
selectedColor : color |
The color to use for this button when the button is pressed or selected if toggle is set to true
. The default
value is Theme::tintLightColor.
selectedIcon : string |
toggle : bool |
Whether the button acts as a toggle button or uses a default behavior. If set to true
the button has an explicit selected state.
By default this property is false
.
This signal is emitted when the button was toggled by user interaction if the toggle property is set to true
.