diff --git a/src/lib/webengine/webinspector.cpp b/src/lib/webengine/webinspector.cpp index d9610911a..1b222b07b 100644 --- a/src/lib/webengine/webinspector.cpp +++ b/src/lib/webengine/webinspector.cpp @@ -24,6 +24,7 @@ #include #include #include +#include QList WebInspector::s_views; @@ -85,7 +86,13 @@ void WebInspector::inspectElement() bool WebInspector::isEnabled() { - return qEnvironmentVariableIsSet("QTWEBENGINE_REMOTE_DEBUGGING"); + if (!qEnvironmentVariableIsSet("QTWEBENGINE_REMOTE_DEBUGGING")) { + return false; + } + if (!QWebEngineSettings::defaultSettings()->testAttribute(QWebEngineSettings::JavascriptEnabled)) { + return false; + } + return true; } void WebInspector::pushView(QWebEngineView *view)