Mercurial > hg > svgui
diff widgets/LayerTreeDialog.cpp @ 639:bf9ef624aadf qt5
Make it possible to build with qt4 as well
author | Chris Cannam |
---|---|
date | Tue, 14 May 2013 12:26:48 +0100 |
parents | d632a1e87018 |
children | d39db4673676 |
line wrap: on
line diff
--- a/widgets/LayerTreeDialog.cpp Mon May 13 14:39:31 2013 +0100 +++ b/widgets/LayerTreeDialog.cpp Tue May 14 12:26:48 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);