+ Reply to Thread
Results 1 to 3 of 3

Thread: Font size issue on Mac OS X

  1. #1
    Join Date
    Aug 2011
    Location
    India
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Font size issue on Mac OS X

    I have a Qt application that runs on Windows, Mac and Linux. On Windows and Linux the fonts of controls have the normal platform defined size. However on Mac OS X, the fonts are too small. This happens for check boxes, radio buttons and combo boxes. However labels have the correct font size. I am not setting the font sizes explicitly anywhere. Is this a known limitation of Qt, or am I missing something?
    There are no stupid questions, but there are lots of inquisitive idiots.

  2. #2
    Join Date
    Apr 2011
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font size issue on Mac OS X

    I've exactly the same issue.

    In my case the QCommandLinkButton's fonts are to small.

    My layouts are also different on Mac comparing to Linux & Windows

    Did you find a solution for this issue yet?


    Added after 38 minutes:


    With my scenario, the help file mentions that one can add a description to the QCommandLinkButton, which will be displayed in a smaller fonts.

    After a quick test, it looks to me that the font size is the same for both the button text and description text.

    It looks like this might be a bug.

    Can anyone confirm on this, please?


    Added after 29 minutes:


    OK, I fixed the layout issue I'd with setFixedHeight on QGroupBox

    It differs from Linux and Windows but easy to fix/align
    Last edited by CSwanepoel; 12th March 2012 at 03:31.

  3. #3
    Join Date
    Apr 2011
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font size issue on Mac OS X

    This must be a bug in Qt code.

    I did the following test and it fixed the issue.

    Qt Code:
    1. QFont bingo = btnClose->font();
    2. bingo.setPointSize(bingo.pointSize());
    3. btnClose->setFont(bingo);
    To copy to clipboard, switch view to plain text mode 

+ Reply to Thread

Similar Threads

  1. Font rendering issue
    By yogeshgokul in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 1st April 2014, 13:19
  2. Font Height and width based on font size
    By Ghufran in forum Qt Programming
    Replies: 1
    Last Post: 31st July 2010, 08:02
  3. Replies: 6
    Last Post: 27th July 2010, 21:07
  4. adjust font size to QLabel-size
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 9th July 2008, 14:33
  5. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16

Tags for this Thread

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