Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Add more content to QMenu
Forum Updated to NodeBB v4.3 + New Features

Add more content to QMenu

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.0k 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.
  • J Offline
    J Offline
    jesuisbenjamin
    wrote on last edited by
    #1

    Hello,

    I am working on an dashboard / launcher application the prototype of which "looks like this":http://t.co/eqLsRhm

    To do this I basically show() or hide() a child QWidget.

    However, I am trying to find what widget fits better the role. I have been thinking of extending the QMenu class, because it inherently has this the behaviour of this dashboard.

    Yet a menu's not supposed to host much content other than menu-items (basically icons+labels). Is it however possible to extend a QMenu class to add any kind of content (i.e. layouts, widgets) to it?

    Thanks.
    B.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sigrid
      wrote on last edited by
      #2

      You can't add layouts to a QMenu, but you can add widgets containing menus to a QMenu using "QWidgetAction":http://doc.qt.nokia.com/latest/qwidgetaction.html.

      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