QDockWidget [Solved]
-
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?
-
[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, =).
-
[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.
-
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 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 !! =)..