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. Is it possible to control the height and width of a QDockWidget embedded in the MainWindow?

Is it possible to control the height and width of a QDockWidget embedded in the MainWindow?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 2.6k Views 3 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.
  • J Offline
    J Offline
    Jeffery
    wrote on last edited by
    #1

    Is it possible to control the height and width of a QDockWidget embedded in the MainWindow?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      You can use
      dockw->setFixedSize(400, 400);
      to have them stay same size.
      You can also set minimum/max.

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

        Or you can use resizeDocks() method to size them dynamically.

        1 Reply Last reply
        2
        • J Offline
          J Offline
          Jeffery
          wrote on last edited by
          #4

          The embedded QDockWidget is resized because the spliter of mainwindow moves. Is it possible to trigger the movement of the horizontal spliter when I move the vertical spliter (to maintain a certain aspect ratio)?

          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