[PyQt] Collapse/expand frame

Hans-Peter Jansen hpj at urpla.net
Fri Aug 14 12:50:09 BST 2009


Am Freitag, 14. August 2009 schrieb Alexei Puzikov:
> >> Actually, you do, as soon as you'll pass over some amount of controls.
> >>
> >> I have the editor here that reimplements the screenshot (it's Maya,
> >> btw) and in worst situations contains approx. 4500 controls. And I'm
> >> still unable to remove
> >> flickering on switch - basically, the layout refresh.
> >>
> >> If anybody can prototype something that works with big amount of
> >> controls - his help would be enormous. Really.
> >
> > Hmm, Alexei, please don't feel offended, but presenting 4500 controls
> > to user basically sounds like a pathologic situation, where _concepts_
> > lost control ;-)...
>
> Well, it's probably Friday evening fluctuated my math a little bit -
> so, in worst case,
> it's 1500 controls. Which is actually pretty easy to achieve: 2
> spacers, label, editor and slider
> for each parameter.

Ahh, okay, we're talking about 500 composite widgets then - which is where 
things start to get imaginable ;-)

> > How is a user supposed to master that? Something similar to
> > car navigation for the screen? (Take the second branch right, move
> > mouse 200mm north, you reached your target, it's on the left side..)
>
> Well, that's what makes my job interesting :) Yes, it's a tough UI
> stuff. Filtering, proper
> grouping, good usable search, tagging, good documentation and most of
> all - good default values :)
>
> > Even, if that widget, or control, if you like, is implemented in C++,
> > as long as it is resizing itself, flickering cannot be suppressed,
> > since it forces Qt to redraw the whole frame. I would start looking,
> > how to get the whole thing into managable pieces. Next you may try to
> > use a home grown layout manager, that is optimized for these cases
> > (e.g. moves screen areas, but that's going to be tough, don't it?)
>
> I'm not sure. What actually bugs me is that layout engine is
> repainting the widgets
> that's haven't changed their geometry. Given how many layouts I have,
> this flickers....
>
> You think this might be overwritten?...

What I had in mind was a layout manager, that's being aware of the 
situation: repaint only small screen areas (the widget, that is resizing 
itself), and copying the unchanged screen areas around, its doable but 
that's going to be a tough job, I assume.

Pete


More information about the PyQt mailing list