Results 1 to 4 of 4

Thread: Shape-changing dialog with qt4.1

  1. #1
    Join Date
    Feb 2006
    Location
    Denmark
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Shape-changing dialog with qt4.1

    Hi

    I'm tying to create a shape-changing dialog using the designer but have some trouble getting the dialog to resize.

    I have set the sizePolizy in the dialog to fixed and set the layout to vertical. The dialog contains a few frames, some of which might be hidden under some circumstances.
    The sizePolizy of the subframes is also set to fixed.


    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    99
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shape-changing dialog with qt4.1

    Quote Originally Posted by moe
    Hi

    I have set the sizePolizy in the dialog to fixed and set the layout to vertical. The dialog contains a few frames, some of which might be hidden under some circumstances.
    The sizePolizy of the subframes is also set to fixed.

    Thanks!
    Hello,

    I guess you want your dialogbox to be of fixed size?
    If so don't use the sizPolicy on the widgets, because this makes it possible to stretch them afterwards.
    Have a look at :
    QLayout::setSizeConstraint(QLayout::setFixedSize)
    which sets the dialog at its sizeHint. You have to use code for this.

    Hope this helps

  3. #3
    Join Date
    Feb 2006
    Location
    Denmark
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Shape-changing dialog with qt4.1

    Quote Originally Posted by Everall
    Hello,

    Have a look at :
    QLayout::setSizeConstraint(QLayout::setFixedSize)
    which sets the dialog at its sizeHint. You have to use code for this.

    Hope this helps
    Thanks! This fixed my problem. I had expected to be able to test this using only the designer and the form preview...

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    99
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shape-changing dialog with qt4.1

    I had expected to be able to test this using only the designer and the form preview...
    I filed this as a bug some time ago and tasktracker shows now it is planned for QT 4.2 to have this functionality directly in the designer.

    Cheers

Similar Threads

  1. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 11:10
  2. Replies: 8
    Last Post: 2nd February 2009, 13:25
  3. Replies: 3
    Last Post: 29th December 2008, 17:54
  4. Shape changing under other tab using slider/spinbox
    By kramed in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2007, 20:59

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.