[PyKDE] ~QStatusBar() doesn't work
Boudewijn Rempt
boud at valdyas.org
Tue Oct 9 19:52:36 BST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(Kmail is still playing up, so I sent my answer to Cheng, instead of
to the list).
On Tuesday 09 October 2001 19:45, John J. Lee wrote:
> On Mon, 8 Oct 2001, cheng wrote:
> > 1. I tried to use the command ~QStatusBar(); however, it doesn't work.
> > I
>
> Don't do that. What are you trying to do to the status bar? If you want
> it to go away, that might be difficult -- Boudewijn Rempt reported trying
> to do that kind of thing in about ten different ways and failed, IIRC.
> You can sort of 'fold up' Qt toolbars, though, and I'm sure there'll be a
> way to do that programmatically too -- look in the Qt docs.
Nowadays, you can easily and cleanly remove most widgets, it's really
nice:
Replace ~QStatusBar() (the ~ operator tries to invert an object in Python)
with the following, and thestatusbar will disappear:
self.statusBar().parent().removeChild(self.statusBar())
This checks who owns the statusbar, and then asks the owner
to remove it. Works like a charm.
- --
Boudewijn Rempt | http://www.valdyas.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7wzjPN8fj6DnPxOgRAgmqAKC5VHw6B9KXcHs/gDomxswAh1hV3QCgoZVV
12XQar3pE2iABfR6ge848qs=
=Hv5m
-----END PGP SIGNATURE-----
More information about the PyQt
mailing list