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. [Moved] How to add a scrollbar on a QMainWindow with QDockWidgets
Forum Updated to NodeBB v4.3 + New Features

[Moved] How to add a scrollbar on a QMainWindow with QDockWidgets

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.1k 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.
  • B Offline
    B Offline
    Bekos
    wrote on last edited by
    #1

    Hello again everyone!

    I think I am stuck in a very simple thing.
    I have a QMainWindow and multiple QDockWidgets. Each QDockWidget has a fixed size. What I want to achieve is the following:
    While I am docking QDockWidget on one side of the QMainWindow (e.g. at the right side), I want a vertical scrollbar to appear if the combined height of all the docked QDockWidgets are bigger than the height of the QMainWindow.
    Right now the default behaviour is simple: It just doesn't let you to dock a QDockWidget if the QMainWindow height is smaller than the combined height of all the docked QDockWidgets. (well it does but not at the top or bottom of the others; only as a tabbed dock).
    I tried to hang a scrollable area under the central widget, or set the scrollable area as the central widget but of course it didn't work.
    Any ideas how I can achieve that?
    Thank you in advance guys.

    Cheers

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bekos
      wrote on last edited by
      #2

      Sorry, I posted in the wrong category. Can someone move it to "General and Desktop"? Thanks.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #3

        Moved. And title shortened a bit (it was toooo long)

        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