How to create menus with design studio?
-
Using qtdesignstudio 4.4.0. I'm unable to figure out how to create a simple menubar at window's top edge and to add menus to it. And how to add a context menu? I can't find anything about these in the Qt Design Studio Manual - such a basic UI component! Can someone help?
Thanks! -
@Tom-asso said in How to create menus with design studio?:
And how to add a context menu? I can't find anything about these in the Qt Design Studio Manual - such a basic UI component! Can someone help?
To create simply Desktop applications, QtDesign Studio is the wrong tool.
Better use QtCreator instead....and if you like, its integrated UI Designer. -
@Pl45m4 - I want my app GUI to be QML-based, to allow eventual port to mobile devices. I've found qtcreator's ui-designer for QML to be unfortunately quite buggy with frequent crashes.
If QML is intended for wide portability between desktop and mobile apps, I wonder why Design Studio does not support menus???
Thanks! -
@Pl45m4 - I haven't figured out how to add menus in qtcreator either. Specifically for MenuBar; in my previous QtQuick apps I've manually edited the QML to instantiate ApplicationWindow, and then a MenuBar property. But the qtcreator included with Qt 6.7.0 does not support ApplicationWindow in Design view:
import QtQuick.Controls 2.3 import QtQuick.Window 2.1 ApplicationWindow { width: 640 height: 480 visible: true title: qsTr("Hello World") }
The above generates this error message when I switch to qtcreator Design view:
Line 5: This type (ApplicationWindow) is not supported as a root element in Qt Design Studio (M208).
If QML just instantiates Window instead of ApplicationWindow, I see no way to add a MenuBar in Design view.
What am I missing here?
-
To create menus with Design Studio, you can typically use the software's built-in tools or widgets for creating navigation bars or menus. These tools often allow you to customize the appearance and behavior of the menus according to your design preferences and functionality requirements.
-
@Sofiakim - Note that I am using QtQuick/QML (not Qt Widgets) I assume that Design Studio as well as qtcreator would provide tools to create menu bars and menus, but I cannot for the life of me find those tools in qtdesignstudio (4.4.0) or qtcreator (12.0.2, 13.0.0). Can you please tell me specifically where to find these menu-creation tools? Thanks!