PDA

View Full Version : Font size issue on Mac OS X



hitmaneidos
3rd March 2012, 17:15
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?

CSwanepoel
12th March 2012, 03:31
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

CSwanepoel
13th March 2012, 00:01
This must be a bug in Qt code.

I did the following test and it fixed the issue.


QFont bingo = btnClose->font();
bingo.setPointSize(bingo.pointSize());
btnClose->setFont(bingo);