From e18723d66cf470720c29a9d2848150ea1cbe5450 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 摹曛, 14 12月 2023 04:49:35 +0800
Subject: [PATCH] Add example resources

---
 examples/mainwindow/main.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/examples/mainwindow/main.cpp b/examples/mainwindow/main.cpp
index 66f6bee..8813a60 100644
--- a/examples/mainwindow/main.cpp
+++ b/examples/mainwindow/main.cpp
@@ -1,4 +1,5 @@
 #include <QtWidgets/QApplication>
+#include <QtGui/QFont>
 #include <QtCore/QDebug>
 
 #include "mainwindow.h"
@@ -17,6 +18,15 @@
     QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
         Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
     QApplication a(argc, argv);
+
+#ifdef Q_OS_WINDOWS
+    a.setFont([]() {
+        QFont f("Microsoft YaHei");
+        f.setPixelSize(15);
+        return f;
+    }());
+#endif
+
     MainWindow w;
     w.show();
     return a.exec();

--
Gitblit v1.9.1