diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2014-12-03 14:21:09 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2014-12-03 15:53:43 +0200 |
commit | e824e206f28eb20bcb6f1d9064990f5e927261f4 (patch) | |
tree | 35fd18fd83888bf5b37fce29104a6d9c4b620eeb | |
parent | 6fbc0bcce1e4f082ddedc8a48cadf3e4214e94fa (diff) |
It is not a good idea to set a default font size if that
font size is going to be in pixel values. The default
font size should be a point value so that it can be
adjusted based on the DPI of the screen. The Qt Quick
Controls scale them selves based on the Implicit Height
of the default font size, and by setting the default
font size to a pixel value, the Implicit Height will
always be the same.
This fixes the issue of Qt Quick Controls being too small
on HiDPI screens.
Change-Id: Iaa47a911e5f4526a25bf9eb6b7ba747ebf746a38
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
-rw-r--r-- | src/main.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 22bcb1c..8da2831 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -67,7 +67,6 @@ int main(int argc, char **argv) if (QFile::exists(fontName)) { QFontDatabase::addApplicationFont(fontName); QFont font("DejaVu Sans"); - font.setPixelSize(12); QGuiApplication::setFont(font); } else { QFont font; |