Logo FluentUI

Button QML Type

A styled push button with Fluent Design theming. More...

Import Statement: import FluentUI 1.0

Properties

Methods

Detailed Description

Button is a QML component that extends QtQuick.Controls.Button with Fluent Design theme support. It wraps the FluentUI.Controls.StandardButton to provide a button that automatically applies the current theme's colors, typography, and corner radius via the parent's FluentUI attached properties.

Usage Example

 import QtQuick
 import FluentUI

 Button {
     text: "Click me"
     highlighted: true
     onClicked: console.log("Button clicked")
 }

See also QtQuick.Controls.Button and StandardButton.

Property Documentation

enabled : bool

Whether the button is enabled. This property is inherited from QtQuick.Controls.Button.

flat : bool

Whether the button has a transparent background and no border. The default value is false.

font : font

The font used for the button text. This property is inherited from QtQuick.Controls.Button.

highlighted : bool

Whether the button is rendered as the primary action (filled with the accent color). The default value is false.

icon : var

The icon to display on the button, specified as an object with name, source, width, height, and color properties.

text : string

The text displayed on the button. This property is inherited from QtQuick.Controls.Button.

Method Documentation

void onClicked()

Called when the button is clicked. Override this signal handler to perform an action in response to a button press.