diff --git a/src/lib/webengine/webinspector.h b/src/lib/webengine/webinspector.h index 40c5ec477..830415c46 100644 --- a/src/lib/webengine/webinspector.h +++ b/src/lib/webengine/webinspector.h @@ -34,6 +34,8 @@ public: void setView(WebView *view); void inspectElement(); + QSize sizeHint() const override; + static bool isEnabled(); static void pushView(QWebEngineView *view); static void registerView(QWebEngineView *view); @@ -43,7 +45,6 @@ private Q_SLOTS: void loadFinished(); private: - QSize sizeHint() const override; void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; diff --git a/src/lib/webtab/webtab.cpp b/src/lib/webtab/webtab.cpp index 47357bed1..9a3e0e87a 100644 --- a/src/lib/webtab/webtab.cpp +++ b/src/lib/webtab/webtab.cpp @@ -226,7 +226,9 @@ void WebTab::showWebInspector(bool inspectElement) if (inspectElement) inspector->inspectElement(); + const int height = inspector->sizeHint().height(); m_splitter->addWidget(inspector); + m_splitter->setSizes({m_splitter->height() - height, height}); } void WebTab::toggleWebInspector()