IconButton

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

Import Statement: import VPlayApps 1.0
Since: V-Play 2.7.0
Inherits:

Item

Properties

Signals

Detailed Description

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")
   }
 }

Property Documentation

color : color

The color to use for this button in default state.


icon : string

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


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.


selectedIcon : string

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


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.


toggled()

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


Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support