[PyKDE] Re: pyuic and Access to QGridLayout
Chad Brantly
cbrantly at darwin.sfbr.org
Fri Feb 3 06:05:21 GMT 2006
> It is preserved as a child of that QGroupBox
That is true, but there is no way of accessing it directly since it
doesn't preserve the name. If there are multiple children of the
QGroupBox, how can I specify the one I want.
>>My next thought was that I would access the layout widget by name using:
>>
>> self.group_box.layout().child('mygridlayout')
>
> ?? group_box.layout() gives you exactly the layout instance you want.
Doesn't really return the same object. self.group_box.layout() returns
a QVBoxLayout instead of QGridLayout.
This is the code that pyuic creates. I need to access group_boxLayout
later on in my code.
self.group_box=QGroupBox(self.SampleBrowserTab,"group_box")
self.group_box.setColumnLayout(0,Qt.Vertical)
group_boxLayout=QGridLayout(self.group_box.layout())
Any ideas?
-Chad
More information about the PyQt
mailing list