summaryrefslogtreecommitdiff
path: root/src/webtab/webtab.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-11-29 11:13:02 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:06 +0100
commit7018aee5e2192822fea01553348b673d22539475 (patch)
tree46a2becb006b570e06504595001a096625d13fb0 /src/webtab/webtab.cpp
parentRestoring inspector, part 2 (diff)
downloadrekonq-7018aee5e2192822fea01553348b673d22539475.tar.xz
Restoring inspector, part 3
Added a splitter to let inspector widget be resizable Following my wife hint, it seems it is better to let it be in the right part. Let's see what people has to comment about...
Diffstat (limited to 'src/webtab/webtab.cpp')
-rw-r--r--src/webtab/webtab.cpp16
1 files changed, 12 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);