diff options
Diffstat (limited to 'tools/qmldebugger/objectpropertiesview.cpp')
-rw-r--r-- | tools/qmldebugger/objectpropertiesview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/qmldebugger/objectpropertiesview.cpp b/tools/qmldebugger/objectpropertiesview.cpp index 274552a..ae9e8be 100644 --- a/tools/qmldebugger/objectpropertiesview.cpp +++ b/tools/qmldebugger/objectpropertiesview.cpp @@ -43,6 +43,7 @@ ObjectPropertiesView::ObjectPropertiesView(QmlEngineDebug *client, QWidget *pare setLayout(layout); m_tree = new QTreeWidget(this); + m_tree->setAlternatingRowColors(true); m_tree->setExpandsOnDoubleClick(false); m_tree->setHeaderLabels(QStringList() << tr("Property") << tr("Value")); QObject::connect(m_tree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), @@ -58,6 +59,11 @@ void ObjectPropertiesView::setEngineDebug(QmlEngineDebug *client) m_client = client; } +void ObjectPropertiesView::clear() +{ + setObject(QmlDebugObjectReference()); +} + void ObjectPropertiesView::reload(const QmlDebugObjectReference &obj) { if (!m_client) @@ -105,7 +111,6 @@ void ObjectPropertiesView::setObject(const QmlDebugObjectReference &object) m_object = object; m_tree->clear(); - QList<QmlDebugPropertyReference> properties = object.properties(); for (int i=0; i<properties.count(); i++) { const QmlDebugPropertyReference &p = properties[i]; |