Showing with appropriate size some QDockWidget’s, Pyside ??. I Need HELP
Hello, I’m working on a Qt Pyside program and the specifications that were asked to me are: the program must have 4 QDockWidget, each with different functionalities. I would like that the QDockWidgets would start two on left and two on right, with a dimension that is appropriate to see it’s contents.
For reasons that I wasn’t yet able to understand when I start the program, the docked widgets start very close to the edges and most of it’s contents aren’t visible. The Widgets that are loaded in the QDockWidgets were made on QtDesigner and converted to a Python file with the command pyside-uic.
I used as the base for the implementation of the dock widgets on my program, the example code provided by Qt, called dockwidgets. This example is a kind of text edit with some TextList QDockWidgets on the sides, and when I run the example the QDockWidgets are shown with an appropriate size.
I also tried to change the QDockWidgets size with the function resize(), setGeometry(), but they didn’t changed the dock widgets.
I also tried to make a button on the toolbar, with a call to saveGeometry(), saveState() of the main window, that saved the window configuration on a text file, and when the mainwindow is created I read the configurations from the text file, and use restoreGeometry(), restoreState(). But that did’t worked too, the DockedWidgets always start close to the edges with most of it’s content cut, and always on the same positions.
Here is the relevant part of the code of one of the approaches I tried:
The central widget is a textedit, with a size that leaves enough space for the 2 QDockWidgets added on the right side, but when the main window starts, the dock widgets are very close to the right and most of the free space on right is not used.
Thanks for any support, this is my current work and is very important to me.
Best Regards, DavidQ
Photo of the simplified “dockwidgets” from Qt:
Photo of the application with my QDockWidgets:
Please don't double post.
You asked the same thing in" this thread":http://developer.qt.nokia.com/forums/viewthread/12854/. So i'm closing this one.