diff --git a/src/qt6ct/fontspage.cpp b/src/qt6ct/fontspage.cpp index 64c2fa0..9f86aba 100644 --- a/src/qt6ct/fontspage.cpp +++ b/src/qt6ct/fontspage.cpp @@ -61,8 +61,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(); } @@ -72,6 +72,7 @@ void FontsPage::onFontChangeRequested(QWidget *widget) QFont font = QFontDialog::getFont (&ok, widget->font(), this); if(ok) { + widget->setProperty("value", font.toString()); widget->setFont(font); qobject_cast(widget)->setText(font.family () + " " + QString::number(font.pointSize ())); } @@ -92,6 +93,7 @@ void FontsPage::loadFont(QSettings *settings, QLabel *label, const QString &key) font.fromString(settings->value(key, QApplication::font().toString()).toString()); label->setText(font.family() + " " + QString::number(font.pointSize())); label->setFont(font); + label->setProperty("value", font.toString()); } void FontsPage::on_createFontsConfButton_clicked()