Mercurial > hg > svgui
changeset 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 | 6d38e9b15a78 |
children | c6d705bf1672 |
files | widgets/LayerTreeDialog.cpp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
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);