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 in qmenu add scrollarea
Forum Updated to NodeBB v4.3 + New Features

How in qmenu add scrollarea

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 2.0k 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
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    How in qmenu add scrollarea.
    It is not works:

        QScrollArea *scroll = new QScrollArea;
        scroll->setWidget(menu);
    

    it is too not works:

    submenu->setStyleSheet("QMenu { menu-scrollable: 1; }");
    
    JonBJ 1 Reply Last reply
    0
    • M Mikeeeeee

      Hi!
      How in qmenu add scrollarea.
      It is not works:

          QScrollArea *scroll = new QScrollArea;
          scroll->setWidget(menu);
      

      it is too not works:

      submenu->setStyleSheet("QMenu { menu-scrollable: 1; }");
      
      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @Mikeeeeee
      Did you read through https://stackoverflow.com/questions/7121718/create-a-scrollbar-in-a-submenu-qt for this? Suggests can't be done and you have do things another way?

      M 1 Reply Last reply
      0
      • JonBJ JonB

        @Mikeeeeee
        Did you read through https://stackoverflow.com/questions/7121718/create-a-scrollbar-in-a-submenu-qt for this? Suggests can't be done and you have do things another way?

        M Offline
        M Offline
        Mikeeeeee
        wrote on last edited by
        #3

        @JonB So I'm asking you how to do it right.

        JonBJ 1 Reply Last reply
        0
        • M Mikeeeeee

          @JonB So I'm asking you how to do it right.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @Mikeeeeee
          It seems to me they are indicating you can't put a scroll on a menu. The menu-scrollable: 1; was not public, so no guarantee that would work, or work now. Though there were a couple of suggestions you might investigate. If they can't, I can't.

          They also suggested that you don't have a menu with so many items as to need scrolling since it will overwhelm the user, which would be my initial thought, and how you might choose to change your design. Up to you.

          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