# HG changeset patch # User Chris Cannam # Date 1368530808 -3600 # Node ID bf9ef624aadf301512d6947349420a2a2695f3fb # Parent 6d38e9b15a78f2ad030b1c0db19594bf33b3fae6 Make it possible to build with qt4 as well diff -r 6d38e9b15a78 -r bf9ef624aadf widgets/LayerTreeDialog.cpp --- 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);