comparison 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
comparison
equal deleted inserted replaced
632:9d8f6552014d 640:c6d705bf1672
49 49
50 m_modelView = new QTableView; 50 m_modelView = new QTableView;
51 subgrid->addWidget(m_modelView); 51 subgrid->addWidget(m_modelView);
52 52
53 m_modelView->verticalHeader()->hide(); 53 m_modelView->verticalHeader()->hide();
54 #if (QT_VERSION >= 0x050000)
55 m_modelView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
56 #else
54 m_modelView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); 57 m_modelView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
58 #endif
55 m_modelView->setShowGrid(false); 59 m_modelView->setShowGrid(false);
56 60
57 m_modelModel = new ModelMetadataModel(m_paneStack, true); 61 m_modelModel = new ModelMetadataModel(m_paneStack, true);
58 m_modelView->setModel(m_modelModel); 62 m_modelView->setModel(m_modelModel);
59 63
67 71
68 subgrid->setSpacing(0); 72 subgrid->setSpacing(0);
69 subgrid->setMargin(5); 73 subgrid->setMargin(5);
70 74
71 m_layerView = new QTreeView; 75 m_layerView = new QTreeView;
76 #if (QT_VERSION >= 0x050000)
77 m_layerView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
78 #else
72 m_layerView->header()->setResizeMode(QHeaderView::ResizeToContents); 79 m_layerView->header()->setResizeMode(QHeaderView::ResizeToContents);
80 #endif
73 subgrid->addWidget(m_layerView); 81 subgrid->addWidget(m_layerView);
74 82
75 m_layerModel = new LayerTreeModel(m_paneStack); 83 m_layerModel = new LayerTreeModel(m_paneStack);
76 m_layerView->setModel(m_layerModel); 84 m_layerView->setModel(m_layerModel);
77 m_layerView->expandAll(); 85 m_layerView->expandAll();