Logo FluentUI

MenuItem QML Type

A styled menu item with Fluent Design theming. More...

Import Statement: import FluentUI 1.0

Properties

Detailed Description

MenuItem is a QML component that extends QtQuick.Controls.MenuItem with Fluent Design theme support. It provides a clickable item within a Menu, supporting text, icon, checkable state, and keyboard shortcut display, all styled with the current theme's colors and typography.

Usage Example

 import QtQuick
 import FluentUI

 MenuItem {
     text: "Save"
     icon.name: "save"
     shortcut: "Ctrl+S"
     onTriggered: saveFile()
 }

See also QtQuick.Controls.MenuItem, Menu, and MenuBar.

Property Documentation

checkable : bool

Whether the menu item is checkable, displaying a check indicator when toggled. This property is inherited from QtQuick.Controls.MenuItem.

checked : bool

Whether the menu item is currently checked. This property is inherited from QtQuick.Controls.MenuItem.

font : font

The font used for the menu item text. This property is inherited from QtQuick.Controls.MenuItem.

icon : var

The icon displayed on the menu item, specified as an object with name, source, width, height, and color properties. This property is inherited from QtQuick.Controls.MenuItem.

shortcut : var

The keyboard shortcut associated with the menu item, displayed to the right of the item text. This property is inherited from QtQuick.Controls.MenuItem.

text : string

The text displayed on the menu item. This property is inherited from QtQuick.Controls.MenuItem.