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. MenuBar inner working

MenuBar inner working

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 758 Views
  • 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.
  • JanWJ Offline
    JanWJ Offline
    JanW
    wrote on last edited by
    #1

    Hi,

    I'm trying to understand the inner working of the menubar control (not how to use it, but how it is implemented). I already figured out that MenuBar.qml uses MenuBarPrivate, which is actually a QQuickMenuBar object (same for the Menu - QQuickMenu). What I'm failing to understand is how the MenuBar uses the Menu components which are defined inside. I can see that the MenuBar uses a Repeater (model is the QQuickMenuBar menus property), but I can't figure out how that list is populated with the menus that are defined in the MenuBar component.
    Anybody an idea how that is done, I'm sure i'm overlooking something stupid...
    Thanks,

    Jan

    1 Reply Last reply
    0
    • JanWJ Offline
      JanWJ Offline
      JanW
      wrote on last edited by
      #2

      Got it, in the qquickmenubar I see: Q_CLASSINFO("DefaultProperty", "menus"). This will fill the menus list with the inner defined components.

      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