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:
Bildschirmfoto 2014-03-07 um 13.43.23.png
Here is the key code:
Qt Code:
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { a.setStyleSheet("*{ \n" " font: 14px Helvetica;\n" "}"); MainWindow w; w.show(); return a.exec(); }To copy to clipboard, switch view to plain text mode
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
Bookmarks