Results 1 to 4 of 4

Thread: adjusting GUI to different environment

  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question adjusting GUI to different environment

    hi,
    i developed GUI for my application in windowsXp.my application contains Login and Mainwindow, which contains tabwidget.according to the my functionalities i build exe file.

    when i run this exe on windows2000 it is looking vry odd,i mean tabwidget size is not addjusting with that OS pixel properties.
    1.can i see windowsXp style formet in windows2000/98?
    2.how my application dimensions automatically adjust with different environment(for different properties)?


    please help me to overcome this problems.
    thanx in advance.

  2. #2
    Join Date
    Sep 2007
    Posts
    19
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: adjusting GUI to different environment

    1. no, you can't. "windowsxp", "windowsvista" and "macintosh" styles are platform-dependent.
    but you can use "cleanlooks", "windows" or some other Qt style, which is platform-independent. use QApplication's setStyle() for this.

    2. if widget layouts differs depending on the platform, you can use QWidget's setFixedSize(width, height) function, but layouts themself are expected to take best fit, and maybe you are doing something wrong?
    Last edited by nile.one; 16th October 2007 at 05:51.

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

    jjbabu (16th October 2007)

  4. #3
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: adjusting GUI to different environment

    thanx for ur kind response nile.one,

    2. if widget layouts differs depending on the platform, you can use QWidget's setFixedSize(width, height) function, but layouts themself are expected to take best fit, and maybe you are doing something wrong?

    in my application layouts size is not changing,but when i change pixel properties on monitor its appearense is changing,what is the solution for this.

    thanx in advance.

  5. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: adjusting GUI to different environment

    Quote Originally Posted by jjbabu View Post
    in my application layouts size is not changing,but when i change pixel properties on monitor its appearense is changing,what is the solution for this.
    When you change your monitor resolution, often the font sizes will change as well. Many Qt widgets will take font size into account when calculating their optimum size (otherwise the text would not fit). I suspect that this is what is happening.

    It is not realistic to expect absolutely identical pixel perfect layouts on different monitor resolutions. If you need rigid control over the size of all widgets, then don't use layouts.

Similar Threads

  1. Problen with add system environment.
    By Flake in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2007, 14:12
  2. how to use khtmlpart&DOM without KDE environment
    By youshou in forum KDE Forum
    Replies: 1
    Last Post: 27th July 2007, 12:06
  3. Replies: 1
    Last Post: 22nd June 2007, 19:46
  4. Environment symbol
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 1st November 2006, 18:54
  5. Accessing Environment Variables
    By mhoover in forum Qt Programming
    Replies: 6
    Last Post: 21st September 2006, 15:05

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.