Results 1 to 3 of 3

Thread: QDialog Extensions & resizing

  1. #1
    Join Date
    Oct 2009
    Posts
    8
    Thanks
    1
    Qt products
    Platforms
    Unix/X11

    Default QDialog Extensions & resizing

    Hello,
    I've got a problem concerning the way layouts resize their widgets when dealing with QDialogs and their extensions.
    I already found a solution, but it seems to be deprecated; i'm talking about the setExtension/showExtension methods,but they have the problem that the extension I want to show isn't at the bottom of the QDialog but in the middle and anyway i hate to use deprecated methods.
    I read the documentation and found out that the "new way" of showing extension is by using the show/hide functions on the single QWidgets.
    But I tried to do some tests and this method seems to completely fail when resizing.I tried to use any method i knew for resizing the widgets and adjusting the size of the dialog but nothing seems to work.

    I mean this:
    Dialog when the extension is shown:




    Note the size of the label...
    and this is when i hide it:




    As you can see the label changes his size.
    What i wanted it to look like this:



    Does anyone have a solution for this?
    Thank you in advance.
    Last edited by Bakuriu; 25th October 2009 at 19:51. Reason: reformatted to look better

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QDialog Extensions & resizing

    You are searching for setSizeConstraint(QLayout::SetFixedSize). See also the article in our wiki: Expanding dialog.

  3. The following user says thank you to Lykurg for this useful post:

    Bakuriu (26th October 2009)

  4. #3
    Join Date
    Oct 2009
    Posts
    8
    Thanks
    1
    Qt products
    Platforms
    Unix/X11

    Default Re: QDialog Extensions & resizing

    Thanks a lot!
    That really solves anything.

Similar Threads

  1. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  2. QDialog and resizing problem...
    By TemporalBeing in forum Qt Programming
    Replies: 7
    Last Post: 27th March 2009, 15:16
  3. QDialog Resize
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 22nd October 2008, 15:41
  4. adding QAction to QDialog is not working
    By sanjayshelke in forum Qt Programming
    Replies: 3
    Last Post: 13th August 2008, 09:39
  5. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 08:16

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.