Results 1 to 2 of 2

Thread: Changing Windows default font/icons size also changes my application font size

  1. #1
    Join Date
    Mar 2012
    Posts
    12
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Changing Windows default font/icons size also changes my application font size

    Hi there,

    Since I'm counting on fonts to draw some elements in a qpainterpath, changing the MS Windows default font/icons size also changes the size of that elements that are connected to lines and another shapes that are drawn straightly with Qt, making them to lose the wanted shape.
    How can I avoid this issue?

    Thank you very much.

  2. #2
    Join Date
    Nov 2011
    Location
    Poland
    Posts
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Changing Windows default font/icons size also changes my application font size

    Hi

    You have to hardcode fontsize
    QFont::setPixelSize or setFontSize
    or even put that method in resizeEvent if Your widget is resizable.
    You need to experiment with size to obtain that suitable for You.

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

    tcampos (4th April 2012)

Similar Threads

  1. QLabel Font size is not changing???
    By Gokulnathvc in forum Newbie
    Replies: 4
    Last Post: 22nd March 2011, 12:17
  2. Font Height and width based on font size
    By Ghufran in forum Qt Programming
    Replies: 1
    Last Post: 31st July 2010, 09:02
  3. Replies: 1
    Last Post: 3rd December 2009, 16:21
  4. font size in Application Output Pane
    By piotr.dobrogost in forum Qt Tools
    Replies: 0
    Last Post: 4th August 2009, 21:55
  5. changing QLabel font size(label created on the graphicsView)
    By maverick_pol in forum Qt Programming
    Replies: 11
    Last Post: 17th August 2007, 09:36

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.