diff --git a/src/qt6ct/fontspage.cpp b/src/qt6ct/fontspage.cpp index 3e32c5b..019bfac 100644 --- a/src/qt6ct/fontspage.cpp +++ b/src/qt6ct/fontspage.cpp @@ -62,8 +62,8 @@ FontsPage::~FontsPage() void FontsPage::writeSettings(QSettings *settings) { settings->beginGroup("Fonts"); - settings->setValue("general", m_ui->generalFontLabel->font().toString()); - settings->setValue("fixed", m_ui->fixedFontLabel->font().toString()); + settings->setValue("general", m_ui->generalFontLabel->property("value")); + settings->setValue("fixed", m_ui->fixedFontLabel->property("value")); settings->endGroup(); } @@ -81,6 +81,7 @@ void FontsPage::onFontChangeRequested(QWidget *widget) || font.styleName() == QLatin1String("Roman"))) font.setStyleName(QString()); + widget->setProperty("value", font.toString()); widget->setFont(font); qobject_cast(widget)->setText(font.family () + " " + QString::number(font.pointSize ())); } @@ -101,6 +102,7 @@ void FontsPage::loadFont(QSettings *settings, QLabel *label, const QString &key) : QFontDatabase::systemFont(QFontDatabase::GeneralFont)).value(); label->setText(font.family() + " " + QString::number(font.pointSize())); label->setFont(font); + label->setProperty("value", font.toString()); } void FontsPage::on_createFontsConfButton_clicked()