Results 1 to 4 of 4

Thread: changing a dialog according to the display size

  1. #1
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question changing a dialog according to the display size

    Hi to all,

    Thanks for your support and help...

    I have made a simple dialog.. which occupy the screen size(18.5")... of my desktop... but when I use it on another desktop with(17"). I am unable to see the complete application....

    May I know if there's a chance to set the program automatically set the size according to the screen size...??????????

    Thanks for the help in Advance...

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: changing a dialog according to the display size

    The screen size is available through QDesktopWidget.
    J-P Nurmi

  3. #3
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: changing a dialog according to the display size

    Thanks for the reply dude....

    but if you could provide me a simple example that might help me in understanding the usage of the qdesktopwidget accordingly....

    a simple way of using as I use designer to design the dialog....

    so please provide me simple example....

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: changing a dialog according to the display size

    Qt Code:
    1. #include <QDesktopWidget>
    2. ....
    3. resize(qApp->desktop()->width(), qApp->desktop()->height));
    4. ....
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. The following user says thank you to spirit for this useful post:

    manmohan (15th January 2009)

Similar Threads

  1. QLabel size, for image display
    By C167 in forum Qt Programming
    Replies: 13
    Last Post: 25th October 2013, 16:09
  2. why QFileDialog does not display the default winxp dialog?
    By mismael85 in forum Qt Programming
    Replies: 5
    Last Post: 21st March 2008, 13:39
  3. window sizes changing even though max size defined
    By JonathanForQT4 in forum Newbie
    Replies: 3
    Last Post: 6th August 2007, 10:39
  4. Dynamically changing QGroupBox size
    By T4ng10r in forum Qt Programming
    Replies: 5
    Last Post: 30th March 2007, 15:02
  5. Replies: 4
    Last Post: 10th December 2006, 09:04

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.