Results 1 to 3 of 3

Thread: Simple frame control doesn't resize when I hide()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Simple frame control doesn't resize when I hide()

    Can someone please help me with this?

    I have received and researched several soultions to this seemingly simple task
    without finding a working one.

    I have a widget. It consists of a frame which contains some text and
    a button. Click on the button and the text disappears and the
    frame resizes to show only the button. Click on the button and the
    text reappears and the frame expands to it's previous size.

    This widget lives alone in a GroupBox on an existing form.
    It is not a top level widget.
    For now I don't care whether the form resizes or not, I just want the
    above functionality..

    No matter what I try, the text disappears but the frame refuses to
    resize.

    Several people have indicated that

    layout()->setSizeConstraint(QLayout::SetFixedSize);

    is the answer. I've tried that, I believe that is only true for top level (ie Dialogs)
    widgets.

    I've attached a simple.ui file.


    many thanks...
    Mark
    Attached Files Attached Files

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.