From 8e9375c7aca2eb17bfd7ca943040e4072f7b96a7 Mon Sep 17 00:00:00 2001 From: shouchih_chen Date: Wed, 3 Jul 2024 22:31:37 +0800 Subject: [PATCH] try to fix font name not show issue. --- NameCreater/NameCreater.cpp | 3 ++- NameCreater/NameCreater.vcxproj | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NameCreater/NameCreater.cpp b/NameCreater/NameCreater.cpp index 0d2729d..a3f871d 100644 --- a/NameCreater/NameCreater.cpp +++ b/NameCreater/NameCreater.cpp @@ -94,8 +94,9 @@ void NameCreater::loadFont(const QByteArray& fontdata){ version_font.setPixelSize(12); //ui.tital_label->setFont(tital_font); + QString fontName = QString::fromUtf8(family_list.at(0).toUtf8()); ui.version_label->setFont(version_font); - ui.version_label->setText(QString(VERSION).append("/cht font:").append(family_list.at(0))); + ui.version_label->setText(QString(VERSION).append("/cht font:")+fontName); QList titals = findChildren(QRegularExpression("tital_label")); foreach(auto tital, titals) { diff --git a/NameCreater/NameCreater.vcxproj b/NameCreater/NameCreater.vcxproj index 7f893a9..bfb8cd6 100644 --- a/NameCreater/NameCreater.vcxproj +++ b/NameCreater/NameCreater.vcxproj @@ -55,7 +55,7 @@ 5.15.2_msvc2019_64 - core;gui;widgets + core;gui;widgets;network debug @@ -65,7 +65,7 @@ $(DefaultQtVersion) - core;gui;widgets + core;gui;widgets;network release