Is this what you mean?
If not- would you add an example?
from PyQt4 import QtCore, QtGui
import sys
class Dialog(QtGui.QDialog):
def __init__(self,parent=None):
QtGui.QDialog.__init__(self, parent)
self.button1 = QtGui.QPushButton("One")
self.button2 = QtGui.QPushButton("Two")
self.button3 = QtGui.QPushButton("Three")
self.button4 = QtGui.QPushButton("Four")
self.h_layout = QtGui.QHBoxLayout()
self.v1_layout = QtGui.QVBoxLayout()
self.v2_layout = QtGui.QVBoxLayout()
self.v1_layout.addWidget(self.button1)
self.v1_layout.addWidget(self.button2)
self.v2_layout.addWidget(self.button3)
self.v2_layout.addWidget(self.button4)
self.h_layout.addChildLayout(self.v1_layout)
self.h_layout.addChildLayout(self.v2_layout)
self.setLayout(self.h_layout)
def main(args):
app = QtGui.QApplication(args)
dlg = Dialog()
dlg.show()
sys.exit(app.exec_())
#--------------------------------------------------
if __name__ == "__main__":
main(sys.argv)
Message: 1
Date: Fri, 26 Jan 2007 23:15:42 +0100
From: Andreas Pakulat <[EMAIL PROTECTED]>
Subject: [PyKDE] [EMAIL PROTECTED]: re:Multiple layouts on same
Window]
To: PyKDE <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Please stay on the list.
What I see there: The QWidget doesn't have a
parent, which means it is not a child of your dialog. Also it's show()
method is never called, so it doesn't display.
And last but not least: You don't need the QWidget, just set the layout
on the dialog.
----- Forwarded message from Tony Cappellini <[EMAIL PROTECTED]> -----
*Hello Andreas,
Thanks for the reply.
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):
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde