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. How to set buttons in popup mode
Qt 6.11 is out! See what's new in the release blog

How to set buttons in popup mode

Scheduled Pinned Locked Moved General and Desktop
10 Posts 3 Posters 5.4k 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.
  • M Offline
    M Offline
    mahesh
    wrote on last edited by
    #1

    hi..i want to create a button ..which have the property when i clicked on that button it should have to show some set of buttons down to that button..like toolbutton with menu options...some one please help me

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      You might have a look at "contectmenuevent":http://doc.qt.nokia.com/4.8-snapshot/qwidget.html#contextMenuEvent

      Qt Certified Specialist
      www.edalsolutions.be

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

        it is also looks like tool button popup mode ....what is the difference betwwen the two methods

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Just create a QMenu, and use setMenu on the QPushButton.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mahesh
            wrote on last edited by
            #5

            i already created that thing... but what iam trying to do is grouping of buttons when i clicked on the parent button then all child buttons should dropdown ....

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Huh? That's a weird requirement. You really mean that you have a set of buttons that show a menu, and when you click one of them, they all -thow- show their menu's?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mahesh
                wrote on last edited by
                #7

                yes that one only

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  Yes, or no?

                  Yes, they all need to show their menu, or

                  no, only the one clicked needs to show a menu?

                  Which one is it?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mahesh
                    wrote on last edited by
                    #9

                    no....

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      So... what's the problem with just setting a QMenu on the button then?

                      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