What is the best way to create an application like the "QT Main Window Demo" using Qt Designer?
What is the best way to create an application like the "QT Main Window Demo" using Qt Designer?
"Just do it"?Have you tried if yourself? Did you experience any problems?
J-P Nurmi
Yes ! "Just Do It" it helps
Well, Qt Designer supports designing dock widgets so that's all I have to say unless the original poster elaborates the problem. The more specific question one comes up with the more specific answer s/he usually gets. If the problem is about how to place a dock widget on the form, here is what Qt Designer manual has to say about it: Dock Widgets.
J-P Nurmi
I placed several dock widgets in a "main window" inside a "grid layout" . The problem is that the "grid layout" does not perfectly fill the "main window" and does not resize with the window. This works in the "demo" but they, of course, don't use the designer.![]()
Placing a dock widget into a grid layout kills most of its features. It won't be a dockable widget anymore. QMainWindow has a special layout which can handle dock widgets like they should. That's why Qt Designer offers a main window template, like mentioned in the Qt Designer manual link in my previous post.
Floating layouts don't follow the size of the form. Deselect all children and select a layout from the toolbar instead. That way you'll install so called top level layout which will follow the form size.The problem is that the "grid layout" does not perfectly fill the "main window" and does not resize with the window.
J-P Nurmi
blaylockr (11th August 2008)
I have successfully re-create the DockWidget sample using Qt Designer to create all the user interface; including the dock. After the GUI complete I just add code to fill in the widget and add code for signal-slot.
One thing to remember is to set on the "dockable" property before arranging the widget in the "grid" layout. I got this right after some trial&error
PS: I also have to re-create the dock for "Cute Editor" sample from chapter 4 of Daniel Molkentin "The Book of Qt 4" doing the same method.
Bookmarks