Backport of [1] plus a quick cmake build fix.
[1] https://www.opencode.net/trialuser/qt6ct/-/commit/2d99bd0881aeac0a0eab9595159009ff750a1889
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,2 +34,5 @@
 find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS LinguistTools)
+if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10)
+    find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS GuiPrivate WidgetsPrivate)
+endif()
 
--- a/src/qt6ct-qtplugin/qt6ctplatformtheme.h
+++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.h
@@ -32,3 +32,7 @@
 #include <qpa/qplatformtheme.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 10, 0))
+#include <private/qgenericunixtheme_p.h>
+#else
 #include <private/qgenericunixthemes_p.h>
+#endif
 #include <QObject>
