diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-09-29 01:35:05 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-09-29 01:35:05 (GMT) |
commit | 8e89f14c0321d96fdeffbd3153f87a43ee9966b6 (patch) | |
tree | 73d00e85f878d4270fef9c68bcb098e5387dcb80 /tools | |
parent | b9c5786bcda0fd48684c75b592d61bc427a9dba6 (diff) | |
download | Qt-8e89f14c0321d96fdeffbd3153f87a43ee9966b6.zip Qt-8e89f14c0321d96fdeffbd3153f87a43ee9966b6.tar.gz Qt-8e89f14c0321d96fdeffbd3153f87a43ee9966b6.tar.bz2 |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmldebugger/engine.cpp | 13 |
1 files 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 <QLineEdit> #include <QTreeWidget> #include <QTableWidget> +#include <QSplitter> #include <QTabWidget> #include <QMouseEvent> #include <QAction> @@ -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) |