Qt QML 菜单栏和菜单未显示
Qt QML MenuBar and Menus not showing
我是Qt和Qt/QML的新手,我正在尝试设置菜单栏,但它根本没有显示它。
我已经复制了粘贴的代码,但仍然一无所获(来自 Qt 文档)。
import QtQuick 2.0
import QtQuick.Controls 1.0
ApplicationWindow {
visible: true;
width: 1000;
height: 700;
title: "App";
MenuBar {
Menu {
title: "File"
MenuItem { text: "Open..." }
MenuItem { text: "Close" }
}
Menu {
title: "Edit"
MenuItem { text: "Cut" }
MenuItem { text: "Copy" }
MenuItem { text: "Paste" }
}
}
}
使用
menuBar: MenuBar{//Menubar content}
而不是
MenuBar{//Menubar content}
相关文章:
- C++ 我的开关格式中的循环不允许我显示菜单选项或接受输入?
- 如何以编程方式显示功能区按钮的下拉菜单?
- 如何使用IExecuteCommand和动词在上下文菜单外壳扩展中显示本地化文本和自定义图标?
- QTool按钮按Alt后显示菜单
- 我的期末考试遇到了麻烦.代码不断循环回到我的订购菜单,不会显示我的总价
- 如何在所有者描述的 MFC CMenu 派生菜单中显示复选框?
- 无法在 cocos2dx 中显示菜单菜单项图像
- 将WM_CHANGEUISTATE发送到窗口应用程序后,当用鼠标访问菜单时,助记符不会显示在系统菜单上
- 如何手动显示CMFCToolBarComboBoxButton子菜单
- 如何为 QComboBox 的弹出菜单指定与框本身中显示的不同的字符串?
- TrackPopupMenu 显示的系统菜单与窗口状态不匹配
- 如何更新C 中已使用TrackPopupMenu显示的上下文菜单
- QT在菜单项上显示模态对话框(.UI)单击
- 切换菜单计算器将不显示算术
- 应用程序菜单中显示错误
- 如何在显示游戏菜单时处理无效输入
- 单击"菜单"时显示消息框未显示在屏幕上
- 如何使用循环显示菜单并重新提示输入
- 用于创建菜单栏的c++ win32程序(程序编译并运行,也显示窗口但不显示菜单栏)
- C++控制台不显示菜单