diff --git a/modules/gui/qt/maininterface/mainctx.hpp b/modules/gui/qt/maininterface/mainctx.hpp
index ba82c43bccef7dbdaf5a6a78570655ee136a6687..43c7d1fcf905bd0e6c2cccd696e677c222423d06 100644
--- a/modules/gui/qt/maininterface/mainctx.hpp
+++ b/modules/gui/qt/maininterface/mainctx.hpp
@@ -260,14 +260,17 @@ public:
 
     Q_INVOKABLE static inline bool useTopLevelWindowForToolTip() {
         assert(qGuiApp);
-        if (QT_VERSION < QT_VERSION_CHECK(6, 8, 0))
+        if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 8, 0))
             return false; // Feature is not available
 #ifndef QT_STATIC // We have patched contrib Qt to fix both of the spotted Qt bugs
-        if (QT_VERSION < QT_VERSION_CHECK(6, 8, 2))
+        if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 8, 2))
             return false; // This feature was not tested properly upstream, and often causes crashes (QTBUG-131898, #28919).
 #endif
-        if (qGuiApp->platformName().startsWith(QLatin1String("wayland")))
-            return false; // Wayland is too buggy (tested with KWin 6.2), and there is no sign it'll improve by Qt 6.8.2 (QTBUG-131899).
+        if constexpr (QT_VERSION < QT_VERSION_CHECK(6, 9, 1))
+        {
+            if (qGuiApp->platformName().startsWith(QLatin1String("wayland")))
+                return false; // QTBUG-135158
+        }
         return true;
     }