PDA

View Full Version : Which have I to set to have a right rect() into paintevent of custom widget ?



tonnot
3rd May 2012, 10:04
I have set Qsize() returning info for sizehint, minimunsizehint, minimumsize, but the rect() I have into my custom widget paintevent() is wrong.
(And I see - I know that the values at sizehint, etc are right )

Have I to resize the 'internal' qwidget ?

My custom widget is a simple text-item. I want to 'resize' it giving a 20% plus for the height I get from fontmetrics.
Any help would be apprecciated.
Thanks

Spitfire
9th May 2012, 08:58
You're here long enough to know that example (especially compilable) tells a thousand words, so maybe you can show us your problem this way?