Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Quick MenuBar embedded in QWidget?
Forum Updated to NodeBB v4.3 + New Features

Quick MenuBar embedded in QWidget?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 589 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bootchk
    wrote on last edited by
    #1

    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.)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved