[PyKDE] autoAdding buttons to a grid
Richard Smith
smithbone at gmail.com
Wed May 18 08:05:36 BST 2005
> The closest thing I've found in the docs to removing a widget is
> reparent() but the docs say:
>
> "Warning: It is extremely unlikely that you will ever need this
> function. If you have a widget that changes its content dynamically,
> it is far easier to use QWidgetStack or QWizard."
>
So much for believing the documentation. More searching revaled a
post on this list from Brent.Burley at Disney.com back in 2001 who
suggested using:
.reparent(QWidget(),0,QPoint()) on the widget. And it seems to work.
If self.bgMain is my buttongroup and I do a
self.bgMain.reparent(QWidget(),0,QPoint()) then the button group and
all its buttons dissapear.
Does anyone know if there is any drawbacks to doing this over and over
creating a new buttongroup each time to hold my new buttons?
What happens to self.bgMain after I reparent the widget?
--
Richard A. Smith
More information about the PyQt
mailing list