[PyKDE] setIndicator in QProgressBar subclass
Hans-Peter Jansen
hpj at urpla.net
Thu Feb 3 13:34:57 GMT 2005
Hi Torsten,
On Wednesday 02 February 2005 23:54, Torsten Marek wrote:
> Hello Peter,
>
> you are rebinding the variable indicator. This destroys the
> reference which you get from Qt. In C++, operator= of QString is
> overloaded and the instance is not destroyed. Just modify the
> instance, exchange
>
> indicator = "Measuring..."
>
> with
>
> indicator.truncate(0)
> indicator += "Measuring..."
Thanks for the tip, that did it for me, too.
> Then it works for me. Although I wonder why
> indicator = time.toString()
> does not destroy the reference, too.
I needed a similar modification here.
I ask the authors, if I'm allowed to publish the PyQt variants in the
Wiki, but unfortunately they refused.
This is quite sad, since some of their examples contain pretty nice
(and partly dirty) tricks.
On the other hand, if somebody bought the book, the allowed me to
share the code, if I make sure, they own it, just ask me directly.
Have a good day,
Pete
More information about the PyQt
mailing list