diff --git a/example/qml-Qt6/page/T_Settings.qml b/example/qml-Qt6/page/T_Settings.qml index 46c76b67..04e7d0a7 100644 --- a/example/qml-Qt6/page/T_Settings.qml +++ b/example/qml-Qt6/page/T_Settings.qml @@ -87,26 +87,6 @@ FluScrollablePage{ } } - FluArea{ - Layout.fillWidth: true - Layout.topMargin: 20 - height: 50 - paddings: 10 - FluCheckBox{ - text:"Software Render" - checked: SettingsHelper.getRender() === "software" - anchors.verticalCenter: parent.verticalCenter - onClicked: { - if(SettingsHelper.getRender() === "software"){ - SettingsHelper.saveRender("") - }else{ - SettingsHelper.saveRender("software") - } - dialog_restart.open() - } - } - } - FluContentDialog{ id:dialog_restart title:"友情提示" diff --git a/example/qml/page/T_Settings.qml b/example/qml/page/T_Settings.qml index 76f74ee1..d61429c0 100644 --- a/example/qml/page/T_Settings.qml +++ b/example/qml/page/T_Settings.qml @@ -90,26 +90,6 @@ FluScrollablePage{ } } - FluArea{ - Layout.fillWidth: true - Layout.topMargin: 20 - height: 50 - paddings: 10 - FluCheckBox{ - text:"Software Render" - checked: SettingsHelper.getRender() === "software" - anchors.verticalCenter: parent.verticalCenter - onClicked: { - if(SettingsHelper.getRender() === "software"){ - SettingsHelper.saveRender("") - }else{ - SettingsHelper.saveRender("software") - } - dialog_restart.open() - } - } - } - FluContentDialog{ id:dialog_restart title:"友情提示" diff --git a/example/src/AppInfo.cpp b/example/src/AppInfo.cpp index f6a270fb..6685037c 100644 --- a/example/src/AppInfo.cpp +++ b/example/src/AppInfo.cpp @@ -10,7 +10,3 @@ AppInfo::AppInfo(QObject *parent) { version(APPLICATION_VERSION); } - -void AppInfo::init(QQmlApplicationEngine *engine){ - engine->rootContext(); -} diff --git a/example/src/AppInfo.h b/example/src/AppInfo.h index c4a5024f..dcc59543 100644 --- a/example/src/AppInfo.h +++ b/example/src/AppInfo.h @@ -14,7 +14,6 @@ private: explicit AppInfo(QObject *parent = nullptr); public: SINGLETONG(AppInfo) - void init(QQmlApplicationEngine *engine); }; #endif // APPINFO_H diff --git a/example/src/helper/SettingsHelper.h b/example/src/helper/SettingsHelper.h index a177c0d1..e1f7954d 100644 --- a/example/src/helper/SettingsHelper.h +++ b/example/src/helper/SettingsHelper.h @@ -19,8 +19,6 @@ public: SINGLETONG(SettingsHelper) ~SettingsHelper() override; void init(char *argv[]); - Q_INVOKABLE void saveRender(const QVariant& render){save("render",render);} - Q_INVOKABLE QString getRender(){return get("render").toString();} Q_INVOKABLE void saveDarkMode(int darkModel){save("darkMode",darkModel);} Q_INVOKABLE int getDarkMode(){return get("darkMode",QVariant(0)).toInt();} Q_INVOKABLE void saveUseSystemAppBar(bool useSystemAppBar){save("useSystemAppBar",useSystemAppBar);} diff --git a/example/src/main.cpp b/example/src/main.cpp index 194297b6..c7702009 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -43,18 +43,8 @@ int main(int argc, char *argv[]) QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif #endif - if(SettingsHelper::getInstance()->getRender()=="software"){ -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) - QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); -#elif (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); -#endif - } QGuiApplication app(argc, argv); - // QLoggingCategory::setFilterRules(QStringLiteral("qt.scenegraph.general=true")); - // qSetMessagePattern("%{category}: %{message}"); QQmlApplicationEngine engine; - AppInfo::getInstance()->init(&engine); engine.rootContext()->setContextProperty("AppInfo",AppInfo::getInstance()); engine.rootContext()->setContextProperty("SettingsHelper",SettingsHelper::getInstance()); #ifdef FLUENTUI_BUILD_STATIC_LIB