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

[SOLVED] QMenuBar problem

Scheduled Pinned Locked Moved General and Desktop
6 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello,

    I'm using a QTableView and i put a QMenuBar in the last column but when I insert a QMenu, it's not displayed. I must click on a kind of double-array in order to get menus while I would like a menu like in a QMainWindow i.e all menu were displayed horizontally.

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

      Hi,
      Please provide some code/images of your requirements so that we can understand what exactly is the problem. Are you using your own delegate or setIndexWidget().

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I'm using the setIndexWidget() method and the cell displays a ">>" button in order to print the menu while I want the menu directly.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sam
          wrote on last edited by
          #4

          Ok.
          Try this hope it solves what you need.

          @QMenu *menu = new QMenu(this);
          menu->addMenu(" Austria");
          menu->addMenu(" Dubai");

          yourButton->setMenu(menu);@

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Thanks you very much, it's exactly what I was expecting !

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              You are welcome!!!!!

              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