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. QDockWidget [Solved]
QtWS25 Last Chance

QDockWidget [Solved]

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

    Hello, I looked through the Class REference for QDockWidget, and even created a default Qt App with just a DockWidget, but can't seem to find anything about how to set it's location to bottom, rather than top,left,right, I'd like it at the bottom, is there any way to do this, or do I need to write a work around?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Something like this when you add your widget to the QMainWindow, perhaps?

      @
      mainwindow->addDockWidget(Qt::BottomDockWidgetArea, dockwidget);
      @

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RichardM198030
        wrote on last edited by
        #3

        [quote author="mlong" date="1314400378"]Something like this when you add your widget to the QMainWindow, perhaps?

        @
        mainwindow->addDockWidget(Qt::BottomDockWidgetArea, dockwidget);
        @[/quote]

        Thanks, I did forget to add it using the addDockWidget function.. That probably also explains why it's over top of my MenuBar too. And I didn't use mainwindow.. I have AdvancedTextEditor as my, sorry, having a memory lapse here, =/.. Any way, just having addDockWidget, under the rest should work, thanks for your time, =).

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          Glad it worked! Be sure and make the thread as [Solved]. Thanks!

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RichardM198030
            wrote on last edited by
            #5

            [quote author="mlong" date="1314401009"]Glad it worked! Be sure and make the thread as [Solved]. Thanks!
            [/quote]

            It worked, but, it won't resize, now it's taking up the entire size of the window. I tried dockWidget->setMinimumHeight, there's no known options. Aaah well, I'll get it figured out at some point.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              I'm not sure what the behavior of a QDockWidget is if it's not used in conjunction with a QMainWindow. According to the docs, a QDockWidget is designed to be docked in a QMainWindow, not just an arbitrary widget. You can always create a QMainWidget, and set your AdvancedTextEditor as its central widget. Then the dock widget should behave properly.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                RichardM198030
                wrote on last edited by
                #7

                [quote author="mlong" date="1314403576"]I'm not sure what the behavior of a QDockWidget is if it's not used in conjunction with a QMainWindow. According to the docs, a QDockWidget is designed to be docked in a QMainWindow, not just an arbitrary widget. You can always create a QMainWidget, and set your AdvancedTextEditor as its central widget. Then the dock widget should behave properly.

                [/quote]

                Thanks for all the help, =). Solved !! =)..

                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