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. Resizeable QMenuBar
Qt 6.11 is out! See what's new in the release blog

Resizeable QMenuBar

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

    How to make resizeable menu bar like this?

    image link

    i.e move some QMenu_s down, according the window size.
    Is this possible?
    I called QMenuBar::adjustSize() but without result.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      adjustSize() has nothing to do here. There's no direct support for multiline menus in QMenuBar.

      You would have to override the resize event and add/remove actions on the fly.
      Another option is to create your own layout and add buttons (make them flat and give them menus) instead of actions. See the Flow Layout Example for more details.

      To be honest both these options are awful.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alatriste
        wrote on last edited by Alatriste
        #3

        @Chris-Kawa said:

        awful

        Thank you for information

        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