diff widgets/LayerTreeDialog.cpp @ 640:c6d705bf1672

Merge from branch "qt5". This revision actually builds with Qt4 (late releases) or Qt5, though it will warn on configure with Qt4.
author Chris Cannam
date Tue, 14 May 2013 12:36:43 +0100
parents bf9ef624aadf
children d39db4673676
line wrap: on
line diff
--- a/widgets/LayerTreeDialog.cpp	Tue Apr 16 15:17:33 2013 +0100
+++ b/widgets/LayerTreeDialog.cpp	Tue May 14 12:36:43 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);