Results 1 to 4 of 4

Thread: Font size setting of the os ignored by the qt app

  1. #1
    Join Date
    Jan 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Font size setting of the os ignored by the qt app

    I tried the "Getting Started" application, and found out that the font size in the qt application is the same regardless of the "Font size" setting of the operating system. I use Windows and have Font size set to "Large fonts".

    Any way to get the qt app take the font size setting into account?

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Font size setting of the os ignored by the qt app

    Which application is the getting started app? In my experience the widget's texts integrate well with the rest of the OS and I use a slightly larger font size than default...

    Could it be that the widgets you are referring to are drawing without the help of a QStyle - hence uses a fixed font size?

  3. #3
    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: Font size setting of the os ignored by the qt app

    First of all, make sure your application isn't hardcoding any font sizes. This is unfortunately easy to do in Designer, because if you change any font property (such as bold), then Designer will generate a UI file with ALL font properties set.

    Otherwise Qt should be using the system defined application font.

    Second, make sure other (non-browser) applications are reflecting this font size change. For some fonts and display resolutions, setting "Large Fonts" won't result in a noticable size difference. On my laptop, setting "Large Fonts" will make the titlebar fonts larger, but everything else will visually look the same.

  4. #4
    Join Date
    Jan 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Font size setting of the os ignored by the qt app

    Thanks for your answers.

    I was able to reproduce the situation also with the "Qt Examples and Demos" application Dialogs/Standard Dialogs.

    In my Windows environment (with "Large fonts" enabled) for example the getInteger() dialog has smaller font in the dialog text and the buttons compared to for example the Information() dialog.

Similar Threads

  1. Reg - Font setting QListBox
    By lawrence in forum Newbie
    Replies: 1
    Last Post: 23rd December 2006, 20:07
  2. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36
  3. QTreeView font size not being set
    By forrestfsu in forum Qt Tools
    Replies: 2
    Last Post: 12th October 2006, 13:53
  4. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

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.