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. Multiple QDockWidget
QtWS25 Last Chance

Multiple QDockWidget

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 458 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.
  • jipe3001J Offline
    jipe3001J Offline
    jipe3001
    wrote on last edited by
    #1

    I am trying to setup several QDockWidget in the Top Dock Area but there are only layout horizontaly.

    Is there a way to layout out them vertically, one below the others?

    Here is the code used to create the 2 DockWidget:

    dock1= new QDockWidget("Data 1");
    dock2= new QDockWidget("Data 2");
    
    dock1->setWidget(fenetre_1);
    dock2->setWidget(fenetre_2);
    
    addDockWidget(Qt::TopDockWidgetArea,dock1);
    

    addDockWidget(Qt::TopDockWidgetArea,dock2);

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

      Yes, change

      addDockWidget(Qt::TopDockWidgetArea,dock1);
      addDockWidget(Qt::TopDockWidgetArea,dock2);
      

      to

      addDockWidget(Qt::TopDockWidgetArea,dock1);
      splitDockWidget(dock1, dock2, Qt::Vertical);
      
      1 Reply Last reply
      1
      • jipe3001J Offline
        jipe3001J Offline
        jipe3001
        wrote on last edited by
        #3

        Thanks Chris for this quick answer
        It's working fine now !

        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