diff --git a/CMakeLists.txt b/CMakeLists.txt index cb373e6..28ff5ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(hsi VERSION ${VER} LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) -find_package(Qt6 6.5 REQUIRED COMPONENTS Quick QuickControls2) +find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2) find_package(PkgConfig REQUIRED) set(CMAKE_CXX_STANDARD 23) @@ -41,7 +41,7 @@ qt_add_resources(hyprsysteminfo "resource" ) target_link_libraries(hyprsysteminfo - PRIVATE Qt6::Quick Qt6::Gui Qt6::QuickControls2 PkgConfig::deps + PRIVATE Qt6::Widgets Qt6::Quick Qt6::Gui Qt6::QuickControls2 PkgConfig::deps ) include(GNUInstallDirs) diff --git a/src/main.cpp b/src/main.cpp index b417e2e..b0bee14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ #include "qmlSources/SystemIconProvider.hpp" #include "qmlSources/SystemInternals.hpp" -#include +#include #include #include #include @@ -11,6 +11,7 @@ #include #include +#include using namespace Hyprutils::String; static std::string readFile(const std::string& filename) { @@ -205,11 +206,12 @@ static void getSystemInfo(CSystemInternals* hsi, QGuiApplication* app) { } int main(int argc, char* argv[]) { - QGuiApplication app(argc, argv); + QApplication app(argc, argv); app.setApplicationName("Hyprland System Info"); - QQuickStyle::setStyle("org.kde.desktop"); + if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) + QQuickStyle::setStyle("org.kde.desktop"); auto systemInternals = new CSystemInternals;