Nominate our 2022 Qt Champions!

Stack of QPushButtons as a popup menu

  • Hi,
    Right now I am implementing a QToolbar and I have a special requirement: I need to include a widget similar to the classic "Start" button of Microsoft systems, but with a little difference:, the menu must be composed by a set of QPushButton items. The size of the buttons within the menu (A, B, C) must be the same of the button (L) in the toolbar.

    | A |
    | B |
    | C |_______________
    | L |_________ (Toolbar)

    I tried using a QToolButton and attaching a QMenu object to include the buttons as QActions, but the menu is too small and it includes a text space not required.
    I need a result more like a stack of big buttons. Is this possible using the native classes of Qt or do I have to create my own widget?


Log in to reply