[PyKDE] PyQT 4.x Display Roles
apaku at gmx.de
Wed Oct 11 10:16:00 BST 2006
On 10.10.06 21:19:59, M.Chambers wrote:
> How can I disable some that I'm not using? Seems like a waste to call
> data() that many times. I'm using the model view stuff and its very
> slow compared to Qt3.
You can't or at least you can't with the built-in Q*Views. You'd have to
write your own view class that only asks for the roles you need.
Also for speeding things up, try to check the role parameter as one of
the first things and return an empty QVariant() if it is uninteresting.
If that's still to slow get a profiling tool and check where the time is
You will feel hungry again in another hour.
More information about the PyQt