[Qt-interest] How to force parent layout to recalculate when minimumSizeHint changes
manish.s.sharma at nokia.com
manish.s.sharma at nokia.com
Tue Feb 17 07:52:17 CET 2009
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
>
More information about the Qt-interest-old
mailing list