On Monday 15 December 2008, Witteveen, Arnt wrote:

> Thanks, I'll look in to that tomorrow. It says however 'This function
> should only be used to display static content', would that be a problem
> with e.g. the progressbar?

Possibly. In other words, it might not be updated unless the user interacts
with it somehow. You would have to experiment with it.

> > It's interesting that you are using QWidget::render() to draw 
> > widgets in delegates because the "classic" way to do this is 
> > to render certain kinds of controls using the QStyle API.
> 
> I simply thought: I need to 'paint' my mWidget now, went to the QWidget
> docs and found no 'paint' functions, but there was a 'render' function. 

That seems reasonable. :-)

> > I hope that helps show you how the QStyle API can be used to 
> > "draw widgets", though I realise that some experimentation 
> > may be necessary to get the desired look and feel.
> 
> I didn't realize you could just use a different painter. Is there any
> way to pass a 'compound' widget like myWidget to some painter and have
> it draw the subwidgets that need it in the correct ('current' or
> 'parent') style? 

That might be difficult. The QStyle API is really for drawing single widgets
and not for drawing collections of them, though perhaps you could do
something with QWidget::render() instead. The only difficulty I can imagine
is making sure that the compound widget has the correct size when it is
rendered.

Good luck!

David
-- 
David Boddie
Senior Technical Writer
Nokia, Qt Software
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to