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. Custom (Q?)menu including Buttons, ComboBoxes etc.

Custom (Q?)menu including Buttons, ComboBoxes etc.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 850 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.
  • M Offline
    M Offline
    michelson
    wrote on last edited by michelson
    #1

    Hello,

    I want to have some kind of pop up menu on button click. However it has some controls like QLineEdit, QSpinBox, QComboBox inside.

    custom menu

    Bottom section is always visible, clicking bottom right QButton shows the menu. To me the whole bottom section looks kinda like QComboBox however the menu is more complicated.

    What is the correct (or easiest?) way to implement such thing? I have never made such thing so idk if I should reimplement QMenu. It seemd from the docs that it is populated by QActions rather than other widgets.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      You can just create the upper part as a widget and hide() it then connect the button clicked() signal to this widget's show() slot

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1
      • M Offline
        M Offline
        michelson
        wrote on last edited by
        #3

        Yep thats what I've started doing half hour ago. I just thought there was some smarter way to create such menu :D

        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