From 8e89f14c0321d96fdeffbd3153f87a43ee9966b6 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 29 Sep 2009 11:35:05 +1000 Subject: Use splitter to separate tree and property views. Helps with problems with viewing complex trees since the tree's horizontal scrollbar is not appearing either. --- tools/qmldebugger/engine.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/qmldebugger/engine.cpp b/tools/qmldebugger/engine.cpp index 8a06213..c9c98ce 100644 --- a/tools/qmldebugger/engine.cpp +++ b/tools/qmldebugger/engine.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -191,14 +192,13 @@ EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) QObject::connect(query, SIGNAL(clicked()), this, SLOT(fetchClicked())); layout->addWidget(query); - QHBoxLayout *hbox = new QHBoxLayout; - hbox->setContentsMargins(0, 0, 0, 0); + QSplitter *splitter = new QSplitter; m_objTree = new QmlObjectTree(this); m_objTree->setHeaderHidden(true); connect(m_objTree, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(itemClicked(QTreeWidgetItem *))); connect(m_objTree, SIGNAL(addExpressionWatch(int,QString)), this, SLOT(addExpressionWatch(int,QString))); - hbox->addWidget(m_objTree); + splitter->addWidget(m_objTree); m_propView = new PropertyView(this); connect(m_propView, SIGNAL(propertyActivated(QmlDebugPropertyReference)), @@ -218,10 +218,9 @@ EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) m_tabs->addTab(m_propView, tr("Properties")); m_tabs->addTab(m_watchTable, tr("Watched")); - hbox->addWidget(m_tabs); - hbox->setStretchFactor(m_tabs, 2); - - layout->addLayout(hbox); + splitter->addWidget(m_tabs); + splitter->setStretchFactor(1, 2); + layout->addWidget(splitter); } void EnginePane::engineSelected(int id) -- cgit v0.12