Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

IconButton

A button with an icon as visual representation. More...

Import Statement: import Felgo 4.0
Since: Felgo 2.7.0
Inherits:

Item

Properties

Signals

Detailed Description

The IconButton is a special button type that shows an AppIcon 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
   iconType: IconType.hearto
   // Icon in selected state
   selectedIconType: IconType.heart

   toggle: true

   onToggled: {
     console.debug("Button toggled")
   }
 }

Property Documentation

color : color

The color to use for this button in default state. The default value is Theme::tintColor.


[since Felgo 2.12.0] 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.


iconType : string

The icon from IconType collection to use for this button in default state.

Note: This property was renamed from icon in Felgo 4.0.0. This is because many types already inherit a property AbstractButton::icon from Qt Quick Controls 2.


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.


selectedIconType : string

The icon from IconType collection to use for this button when the button is pressed or selected if toggle is set to true.

Note: This property was renamed from icon in Felgo 4.0.0. This is to be consistent with the also renamed iconType property.


size : alias

The size of the button's icon.


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.


Signal Documentation

clicked()

This signal is emitted when the button is clicked.

Note: The corresponding handler is onClicked.


pressed()

This signal is emitted when the button is pressed.

Note: The corresponding handler is onPressed.


released()

This signal is emitted when the button is released.

Note: The corresponding handler is onReleased.


toggled()

This signal is emitted when the button was toggled by user interaction if the toggle property is set to true.

Note: The corresponding handler is onToggled.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded