summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwan <m.schwan@phytec.de>2020-02-14 12:07:34 +0100
committerMartin Schwan <m.schwan@phytec.de>2020-02-14 12:15:13 +0100
commit5e755abd1bd13962d08ae95c2c8a8bbbd1e6be24 (patch)
tree1f57d4b20a2d7481c86ffa7e1dcc0f3b9c68e15f
parent0c689d8e8b427304518db82e157e6c075e84a422 (diff)
downloadaidemo-customvision-5e755abd1bd13962d08ae95c2c8a8bbbd1e6be24.tar.bz2
aidemo-customvision-5e755abd1bd13962d08ae95c2c8a8bbbd1e6be24.zip
module: demo: Always use sans-serif font for application
Make sure that the application always uses a sans-serif font. Signed-off-by: Martin Schwan <m.schwan@phytec.de>
-rw-r--r--modules/demo/src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/demo/src/main.cpp b/modules/demo/src/main.cpp
index 51f2504..963da43 100644
--- a/modules/demo/src/main.cpp
+++ b/modules/demo/src/main.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
#include <QCommandLineParser>
+#include <QFont>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
@@ -14,6 +15,11 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationName("aidemo-customvision-demo");
QCoreApplication::setOrganizationName("PHYTEC Messtechnik GmbH");
+ // Make sure we are using a sans-serif font
+ QFont font(QGuiApplication::font());
+ font.setStyleHint(QFont::SansSerif);
+ QGuiApplication::setFont(font);
+
QCommandLineParser parser;
parser.addHelpOption();
parser.addOptions({