PDA

View Full Version : Font Alignment issues on MacOSX 10.8.5



BoBKelso
7th March 2014, 12:56
Hi,
I need to use a different font than the default font on every Widget. But if I do the vertically alignment of the text seems to be wrong. I created an example to show you the issue:

10117

Here is the key code:

#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyleSheet("*{ \n"
" font: 14px Helvetica;\n"
"}");
MainWindow w;
w.show();

return a.exec();
}

What am I doing wrong or how can I fix this issue? To me it looks like the font metrics are not calculated properly. (I know there was a similar issue on 10.9 even with the default font...)
BTW: I compiled my own version of Qt with the following config options:
-opensource -fontconfig

And this issue occurs with Qt 4.8.5 and 5.2

Thanks in advance
Timo