[Qt-interest] How to force parent layout to recalculate whenminimumSizeHint changes
Tony Rietwyk
tony.rietwyk at rightsoft.com.au
Tue Feb 17 08:24:24 CET 2009
Thanks Manish - that did the trick!
> -----Original Message-----
> From: manish.s.sharma at nokia.com [mailto:manish.s.sharma at nokia.com]
> Sent: Tuesday, 17 February 2009 17:52
> To: tony.rietwyk at rightsoft.com.au; qt-interest at trolltech.com
> Subject: RE: [Qt-interest] How to force parent layout to
> recalculate whenminimumSizeHint changes
>
>
> Did you try updateGeometry? It causes a recalculation I guess.
>
> Regards,
> Manish
>
> >-----Original Message-----
> >From: qt-interest-bounces at trolltech.com
> >[mailto:qt-interest-bounces at trolltech.com] On Behalf Of ext
> >Tony Rietwyk
> >Sent: Tuesday, February 17, 2009 8:12 AM
> >To: qt-interest at trolltech.com
> >Subject: [Qt-interest] How to force parent layout to
> >recalculate when minimumSizeHint changes
> >
> >Hi Everybody,
> >
> >I have a widget that is derived from QFrame. The
> >minimumSizeHint method depends on a property that can be set
> >in QtDesigner. When the property value changes, the widget
> >does not change to reflect the new value for the size hint.
> >How can I force the parent's layout to recalculate when the
> >property changes? I tried adjustSize, but it doesn't work:
> >
> >
> >QSize TChordFrame::minimumSizeHint() const {
> > if (FJazz)
> > return QSize( ANSWER_BOX_WIDTH_JAZZ,
> >ANSWER_BOX_HEIGHT_JAZZ );
> > else
> > return QSize( ANSWER_BOX_WIDTH_FB,
> >ANSWER_BOX_HEIGHT_FB ); }
> >
> >void TChordFrame::setJazz(bool value) // Property setter
> >{
> > FJazz = value;
> > adjustSize();
> > repaint();
> >}
> >
> >
> >Thanks in advance!
> >
> >Tony.
> >
> >
> >_______________________________________________
> >Qt-interest mailing list
> >Qt-interest at trolltech.com
> >http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
>
>
> __________ NOD32 3857 (20090216) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
More information about the Qt-interest-old
mailing list