ButtonControl QML Type
A reusable styled button with customizable colors. More...
| Import Statement: | import QtInterfaceFramework.ControlPanelHelper 1.0 |
| Inherits: |
Properties
- hoverColor : color
- normalColor : color
- pressedColor : color
- pressedTextColor : color
- textColor : color
Detailed Description
ButtonControl provides a standardized button with hover and press visual feedback. It inherits from Button, so all standard Button properties (such as text and onClicked) are available.
The button colors can be customised via the normalColor, hoverColor, and pressedColor properties while keeping a consistent look across the simulation control panel.
Usage
ButtonControl {
text: "Add"
onClicked: backend.addItem()
}Custom colors
ButtonControl {
text: "Delete"
normalColor: "#ffe0e0"
pressedColor: "#ff8080"
textColor: "#cc0000"
onClicked: backend.removeItem(index)
}Property Documentation
hoverColor : color
This property holds the background color shown when the user hovers over the button.
By default, the property is set to ControlPanelStyle.hoverGray.
normalColor : color
This property holds the background color of the button in its normal (idle) state.
By default, the property is set to ControlPanelStyle.backgroundGray.
pressedColor : color
This property holds the background color shown while the button is pressed.
By default, the property is set to ControlPanelStyle.primaryBlueLight.
pressedTextColor : color
This property holds the text color shown while the button is pressed.
By default, the property is set to ControlPanelStyle.primaryBlue.
textColor : color
This property holds the text color of the button in its normal and hover states.
By default, the property is set to ControlPanelStyle.textPrimary.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.