summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/webtab.cpp16
-rw-r--r--src/webtab/webtab.h3
2 files changed, 15 insertions, 4 deletions
diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp
index 1f6789f2..2622a96a 100644
--- a/src/webtab/webtab.cpp
+++ b/src/webtab/webtab.cpp
@@ -73,6 +73,7 @@ WebTab::WebTab(QWidget *parent)
, m_progress(0)
, m_part(0)
, m_zoomFactor(10)
+ , m_splitter(new QSplitter(this))
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -80,12 +81,20 @@ WebTab::WebTab(QWidget *parent)
l->setMargin(0);
l->setSpacing(0);
- l->addWidget(view());
+ m_splitter->addWidget(view());
view()->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ // NOTE: this line of code moves the web inspector in the usual position,
+ // BUT my wife prefers it on the right part. Following hint about.
+ // Let's hear people comments about...
+// m_splitter->setOrientation(Qt::Vertical);
+
+ l->addWidget(m_splitter);
+
// fix focus handling
setFocusProxy(view());
+
KWebWallet *wallet = page()->wallet();
if (wallet)
@@ -435,17 +444,16 @@ void WebTab::toggleInspector(bool on)
{
m_inspector = new QWebInspector(this);
m_inspector.data()->setPage(page());
+
+ m_splitter->addWidget(m_inspector.data());
}
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(-1, m_inspector.data());
m_inspector.data()->show();
return;
}
// else
- qobject_cast<QVBoxLayout *>(layout())->removeWidget(m_inspector.data());
-
m_inspector.data()->hide();
page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, on);
diff --git a/src/webtab/webtab.h b/src/webtab/webtab.h
index 2b0f70f3..75f975d8 100644
--- a/src/webtab/webtab.h
+++ b/src/webtab/webtab.h
@@ -41,6 +41,7 @@
// Qt Includes
#include <QWidget>
#include <QWebInspector>
+#include <QSplitter>
// Forward Declarations
class NotificationBar;
@@ -125,6 +126,8 @@ private:
KParts::ReadOnlyPart *m_part;
int m_zoomFactor;
+
+ QSplitter *m_splitter;
};
#endif