Important: Please read the Qt Code of Conduct -

MenuBar (QtQuick.Controls) is hidden by a child window

  • Hi Friends,
    I have a qml scene which contains a Window Based Item, the problem that i have right now is that MenuBar z-order is under that item and I don't know how to fix it.


    The right rect is actually a Window, embedded in the scene, as you can see, the drop down menu (MenuBar) is under the Item. The expected behaviour is that Menus are on top of everything.

    the embedded window item has this flags:

    Qt.Tool | Qt.FramelessWindowHint | Qt.WindowStaysOnBottomHint

    I suspect this problem has no solution because probably MenuBar does not use native windows to render the menu. In my App I use QML Quick exclusively, and I don't want to mix in anything from QWidget framework.

  • Why does the right rect have to be a window in the first place? I'd say you are using something for a purpose it's not designed for. Do you really need a significant chunk of window-specific functionality? If it's just for the possibility of undocking you could use a loader that loads the actual code either into an item (docked) or into a window (undocked).

  • It's a very special requirement. I have changed the approach and it is not a problem anymore.

  • @mnesarco Cool. Would you mind marking the thread as solved, then?

Log in to reply