pyqt - QSplitter question

Vio vmilitaru at sympatico.ca
Fri Feb 7 01:39:16 CET 2003


I want to make a vertical QSplitter use 25% of available space for the 
left pane, and 75% for the right pane (your classic 'nav tree' on left 
pane and 'edit' widget in right pane).

My current code only allows 50-50 splits:

...
self.setCentralWidget(QWidget(self,"qt_central_widget"))
self.layout_central_splitter = 
QHBoxLayout(self.centralWidget(),0,-1,"layout_central_splitter")
# CENTRAL SPLITTER
self.splitter1 = QSplitter(self.centralWidget(),"splitter1")
self.splitter1.setOrientation(QSplitter.Horizontal)
self.layout_central_splitter.addWidget(self.splitter1)# add Widget to 
Layout Manager
...

Adding something like:

self.splitter1.setSizePolicy(QSizePolicy(7,7,0,0,self.splitter1.sizePolicy().hasHeightForWidth()))

seems to have no apparent effect.


Thanks,
Vio





More information about the Python-list mailing list