diff widgets/LayerTreeDialog.cpp @ 663:1a0fdad4af4d tonioni

Merge from the default branch
author Chris Cannam
date Fri, 12 Jul 2013 13:25:22 +0100
parents bf9ef624aadf
children d39db4673676
line wrap: on
line diff
--- a/widgets/LayerTreeDialog.cpp	Thu Jun 20 13:47:36 2013 +0100
+++ b/widgets/LayerTreeDialog.cpp	Fri Jul 12 13:25:22 2013 +0100
@@ -51,7 +51,11 @@
     subgrid->addWidget(m_modelView);
 
     m_modelView->verticalHeader()->hide();
+#if (QT_VERSION >= 0x050000)
+    m_modelView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
     m_modelView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
     m_modelView->setShowGrid(false);
 
     m_modelModel = new ModelMetadataModel(m_paneStack, true);
@@ -69,7 +73,11 @@
     subgrid->setMargin(5);
 
     m_layerView = new QTreeView;
+#if (QT_VERSION >= 0x050000)
+    m_layerView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
     m_layerView->header()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
     subgrid->addWidget(m_layerView);
 
     m_layerModel = new LayerTreeModel(m_paneStack);