[PyKDE] QLayout parent

Sibylle Koczian Sibylle.Koczian at T-Online.de
Sun Jan 28 11:30:00 GMT 2007


  "Tony Cappellini" <cappy2112 at gmail.com> schrieb: 
Is this what you mean?
If not- would you add an example?

[snipped]
        self.h_layout.addChildLayout(self.v1_layout)
        self.h_layout.addChildLayout(self.v2_layout)

Probably wrong, should be:
self.h_layout.addLayout(self.v1_layout)
self.h_layout.addLayout(self.v2_layout)

I've added 2 QVBoxLayouts as children of the QHBoxLayout.
A tiny window appears without any widgets.
What have I not done correctly? 

class Dialog(QtGui.QDialog):

 I think you've got to replace the calls to addChildLayout by calls to addLayout. The documentation says "addChildLayout is called from addLayout" - and I suppose addLayout does more than just this call. Trying your example with this change worked for me, at all events.
HTH,
Sibylle

-- 
Dr. Sibylle Koczian 
Fasanenstrasse 12 
D-82293 Mittelstetten 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070128/23c5c805/attachment.html


More information about the PyQt mailing list