MenuSeparator QML Type

MenuSeparator provides a separator for items inside a menu. 更多...

import 语句: import QtQuick.Controls 1.4

特性

详细描述

Menu {
    text: "Edit"
    MenuItem {
        text: "Cut"
        shortcut: "Ctrl+X"
        onTriggered: ...
    }
    MenuItem {
        text: "Copy"
        shortcut: "Ctrl+C"
        onTriggered: ...
    }
    MenuItem {
        text: "Paste"
        shortcut: "Ctrl+V"
        onTriggered: ...
    }
    MenuSeparator { }
    MenuItem {
        text: "Do Nothing"
        shortcut: "Ctrl+E,Shift+Ctrl+X"
        enabled: false
    }
}
					

另请参阅 Menu and MenuItem .

特性文档编制

[read-only] type : enumeration

This property is read-only and constant, and its value is MenuItemType.Separator .

visible : bool

Whether the menu separator should be visible.