By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 883 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

How to set width of PySide.QtGui.QDockWidget in python

P: 5

I'm completely new to python, i have question with setting width of PySide.QtGui.QDockWidget in python.

I have MainWindow class in python which inherits QtGui.QMainWindow ( PySide ) and have added
one left dock widget with simple plot and
one right dock widget with simple plot and
embedded simple plot in central widget.

I have to set width of each dock window.

1.Left Dock widget should take 20% width of my screen
2.Central Widget should take 40% width of my screen.
3.Right Dock Window should take 40% width of my screen.

I can't use setFixedWidth,minimum and maximum size because user should be able resize to any he wants.

I tried with QSizePolicy, i couldn't get solution.

Could anyone please provide good solution with examples ? Thanks.
Mar 12 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.