doesn't anbody have an idea? it'd be enough if I could set the QDockWidget's size (without changing maximumSize), for example with setGeometry.
doesn't anbody have an idea? it'd be enough if I could set the QDockWidget's size (without changing maximumSize), for example with setGeometry.
Which Qt version do you use?
hi,
i had the same problem. i couldn't figure out how to set the size of
a dockwidget explicitly because it's size is gouverned by the splitter
which handles the size of central widget and the dw. so as a workaround
i save the state of the window (QMainWindow::saveState()) and
restore the state on start up. if the user changes the size of
the dockwidget the size is at least the same the next time.
so only the first time the dw and central widget shares the size of
the mainwindow equaly.
jh
I am having the same problem. Although the suggested solution should work, this isn't a clean solution. Our customers don't want to have to resize everything on initail startup. I will put in a request to Trolltech to see if there is a better solution.
Qt4Originally Posted by jacek
thanks. You're right, this sucks.Originally Posted by rianquinn
Here's what I would do (and have done in the past): Once you have arranged the dockwindow exactly how you want it to appear to the user, save the window state. You now have a string in the config file/registry that you can hardcode and use with loadState() to set the dockwindow size programmatically. You can now remove your load/save code and leave the hardcoded setting (or leave your load/save code in place as you wish).Originally Posted by rianquinn
Save yourself some pain. Learn C++ before learning Qt.
The problem with this idea is that our customers DON'T want to have to adjust the sizes, they want it a specific size at startup. We have strick requirements. This is known to be a bug, and will be fixed in version 4.2.Here's what I would do (and have done in the past): Once you have arranged the dockwindow exactly how you want it to appear to the user, save the window state. You now have a string in the config file/registry that you can hardcode and use with loadState() to set the dockwindow size programmatically. You can now remove your load/save code and leave the hardcoded setting (or leave your load/save code in place as you wish).
I don't think you read what I wrote properly. My solution means that the customers don't have to adjust the size.Originally Posted by rianquinn
Save yourself some pain. Learn C++ before learning Qt.
Is this really fixed in >=4.2.0?
How to do it properly?
Bookmarks