Fw: [PyKDE] Destructor trouble (how to get rid of child widgets ?)

Thomas Malik Thomas.Malik at t-online.de
Mon May 22 19:18:18 BST 2000


> Now, I'd think calling "del" on some parent would do the right thing.
 Not feasible in that case: there's essentially no way to remove a page from
a QTabDialog.
> > Maybe you can right a small example?
> >
Here it goes ...
untar into a directory and start 'kmyapp'. clicking on the 'kde' toolbar
button leads to the dialog i've set up. In the first page, you can select a
'type' (which was meant to be a graph node's type in the original
application), the second page should show, per type, a different set of
'node properties'. The property sets can be configured in config.py.
The dialog class is defined in NodePropertyDialog.py, the
construction/destruction of the property widget sets in PropertyList.py, the
discrete widgets for the different properties are built together in
Property.py.
The 'normal' behaviour (it worked, sort of, until 0.11pre1) is, if you
select some type on the first page, you can switch to the second page and
see some lineedits belonging to the type on the first page.
Now, all the widgets in the second page accumulate, overlapping each other.
In some parts of the code, i outlined different solution alternatives
(deleting the frame widget containing the child widgets on the second page,
using destructors with QWidget.destroy() in the Property subclasses).

Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SAMPLE.TAR.gz
Type: application/x-gzip
Size: 7505 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20000522/58ac16c9/SAMPLE.TAR.gz


More information about the PyQt mailing list