IconPropertiesGroup QML Type
An object to be used as a grouped property compatible with QtQuickControls "icon" grouped property. More...
Import Statement: | import org.kde.kirigami.primitives |
Since: | 6.17 |
Properties
Methods
- IconPropertiesGroup fromControlsIcon(var icon)
Detailed Description
Kirigami components which expose an icon grouped property use this class. Use it if you are writing a component that exposes an icon that you wish to have an icon property compatible with QtQuickControls one, with name, source, color, width and height properties.
Property Documentation
color : color |
This property holds a color for the icon. Only monochrome svg icons can be dinamically recolored.
height : real |
This property holds the preferred height for the icon. This is a size hint for the icon. It depends from the control implementation how this is enforced or not.
name : string |
This property holds a freedesktop theme compatible name for the icon. It is the preferred source for the icon
source : var |
This property can hold a full path to the icon, a QImage or a QIcon representing the icon. Use this with care and prefer name when possible
width : real |
This property holds the preferred height for the icon. This is a size hint for the icon. It depends from the control implementation how this is enforced or not.
Method Documentation
IconPropertiesGroup fromControlsIcon(var icon) |
This method is used to bind an icon from a QtQuickControls to an IconPropertiesGroup to have them to be kept in sync, use it as follows:
import QtQuick import QtQuick.Controls as QQC import org.kde.kirigami as Kirigami Item { Kirigami.PlaceholderMessage { icon: icon.fromControlsIcon(button.icon) } QQC.Button { id.button } }