Results 1 to 7 of 7

Thread: Show/hide part of dialog with resizing.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Default Re: Show/hide part of dialog with resizing.

    No one has any ideas? I suppose I could just do it in code like the example shows, but using the designer would definitly be the best way if it worked.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Show/hide part of dialog with resizing.

    But what exactly doesn't work? Which part you're not able to do with designer?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Show/hide part of dialog with resizing.

    That's as close as I can get with doing everything from within designer. Two lines of external code needed.
    Attached Files Attached Files

  4. The following user says thank you to wysota for this useful post:

    Spockmeat (25th May 2006)

  5. #4
    Join Date
    Apr 2006
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Default Re: Show/hide part of dialog with resizing.

    Oh thanks, the problem was I needed to stick in one more line:
    Qt Code:
    1. this->layout()->setSizeConstraint(QLayout::SetFixedSize);
    To copy to clipboard, switch view to plain text mode 
    I thought that was something that could be set in the designer. Really, I wish more of the examples would be done in the disigner and not straight code, or perhaps both, it'd make it easier to know which settings can be set and where.

  6. The following user says thank you to Spockmeat for this useful post:

    joro (20th January 2009)

  7. #5
    Join Date
    Apr 2006
    Posts
    5
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Show/hide part of dialog with resizing.

    Hi,
    i want to hide widget(s). But with that i want to shrink the size of Dialog.
    i am using 4 or 5 QGroupBox and under it other widgets. when i hide one QGroupBox using hide(), other boxes adjust there size in free space. I want to shrink the Dialog Box when i hide the QGroupBox .
    <BR>

  8. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Show/hide part of dialog with resizing.

    You can use the same solution. Take a look at the archive in my previous post in this thread.

Similar Threads

  1. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  2. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 10:41
  3. disabling resizing of a dialog
    By deepakn in forum Newbie
    Replies: 2
    Last Post: 21st June 2007, 09:14
  4. Resizing the dialog box dynamically
    By vvbkumar in forum Newbie
    Replies: 5
    Last Post: 20th June 2006, 08:54
  5. Problem with resizing dialog
    By Seema Rao in forum Qt Programming
    Replies: 8
    Last Post: 5th May 2006, 17:27

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.