MenuBar QML Type
ネイティブ・メニューバー。もっと見る...
Import Statement: | import Qt.labs.platform |
Inherits: |
プロパティ
方法
- void addMenu(Menu menu)
- void clear()
- void insertMenu(int index, Menu menu)
- void removeMenu(Menu menu)
詳細な説明
MenuBar 型はネイティブプラットフォームのメニューバー用の QML API を提供します。
メニューバーはドロップダウンメニューのリストから構成されます。
MenuBar { id: menuBar Menu { id: fileMenu title: qsTr("File") // ... } Menu { id: editMenu title: qsTr("&Edit") // ... } Menu { id: viewMenu title: qsTr("&View") // ... } Menu { id: helpMenu title: qsTr("&Help") // ... } }
MenuBar は現在、以下のプラットフォームで利用可能です:
- macOS
- Android
- Linux (グローバル D-Bus メニューバーを提供するデスクトップ環境でのみ利用可能)
- Windows
注意: Qt.labs モジュールの型は、将来のバージョンでも互換性が保たれることを保証するものではありません。
Menuも参照して ください。
プロパティ ドキュメント
window : Window |
メソッドの説明
void addMenu(Menu menu) |
メニューバーの最後にmenu を追加します。
void clear() |
メニューバーからすべてのメニューを削除します。
void removeMenu(Menu menu) |
メニューバーからmenu を削除する。
© 2025 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.