Add preprocessor to check Qt version

Use to check if Qt is 5.14 for using
QGuiApplication::setHighDpiScaleFactorRoundingPolicy
This commit is contained in:
joshua
2021-12-04 19:12:11 +01:00
parent 1073ebeebc
commit c744356b0f
3 changed files with 6 additions and 1 deletions

View File

@@ -178,8 +178,10 @@ void GeneralConfigurationPage::applyConf()
settings.setValue("lang", ui->m_lang_cb->itemData(ui->m_lang_cb->currentIndex()).toString());
//hdpi
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QetSettings::setHdpiScaleFactorRoundingPolicy(ui->m_hdpi_round_policy_cb->currentData().toString());
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(QetSettings::hdpiScaleFactorRoundingPolicy());
#endif
//ELEMENT EDITOR
settings.setValue("elementeditor/default-informations", ui->m_default_elements_info->toPlainText());