Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Quick MenuBar embedded in QWidget?
bootchk last edited by
Should creating a MenuBar in a QQuickView contained in a QWidget work? It doesn't seem to, whereas creating a ToolBar does.
My larger problem is porting a desktop QGraphicsView/Scene app that uses picking in the QGScene. I know I can't embed the QGView in a QML app (in Quick 2), but in the reverse can I embed a Quick Controls MenuBar in a QWidget (to simulate a QMainWindow having a menu bar.) If not, then it seems like I can use QML for mobile platforms (without a menubar, which doesn't make sense on a mobile platform) but must use QMainWindow QWidget for desktop (to get a menubar) with QML for other things like toolbar and dialogs. I suppose it is not such a large problem to have separate code for desktop and mobile. But I do like the architecture and style of QML so would prefer to use it.
The reason I want to retain my QGraphicsView/Scene is that I use the picking API of QGS (things like path() and items(point)) and I'm picking by edge (not by a shape contain.) The QML scene doesn't seem to expose that API (I suppose it is a rare use case.)