Results 1 to 2 of 2

Thread: Font size int OS

  1. #1
    Join Date
    Dec 2009
    Posts
    50
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    9

    Smile Font size int OS

    I use a diffrent fonts/font sizes and styles in software. It all works unless somebody would not change OS font size.

    For example in Windows 7 or Vista

    Right Click on DeSctop => Personalization => Display.
    Thehe are 3 options:

    Smaller
    Medium
    Larger

    So if I change it from Smaller to Medium application looks differentlly. Is there any way to ignore such OS settinng in QT application.

    How do you deal with such issue?


    I'm new at UI programming... So do not know much.
    Thank you!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Font size int OS

    If you use layouts properly and doesn't pre-assume any font size then everything should work as expected. In situations when you need to take the size of the font into account for custom things you do, you can use QFontMetrics to calculate space needed to render some text using the current font.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Font Height and width based on font size
    By Ghufran in forum Qt Programming
    Replies: 1
    Last Post: 31st July 2010, 09:02
  2. Replies: 6
    Last Post: 27th July 2010, 22:07
  3. adjust font size to QLabel-size
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 9th July 2008, 15:33
  4. Font Size
    By MrShahi in forum Qt Programming
    Replies: 3
    Last Post: 9th July 2008, 08:37
  5. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 20: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
  •  
Qt is a trademark of The Qt Company.