aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp
diff options
context:
space:
mode:
authorAlexander Drozdov <adrozdoff@gmail.com>2016-10-10 09:49:46 +1000
committerAlexander Drozdov <adrozdoff@gmail.com>2016-10-10 15:07:30 +0000
commit76b76f2723d9709133ce9a7be057b092609096ba (patch)
tree45c75664d44562c943ea08da98dc36da0428a675 /src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp
parent9e67dfbe17e5b9064086ddd8f64649f257984a6a (diff)
CMakeProjectManager: Support drop down selector for options
CMake provides "hack" for cmake-gui, that allows set options variants and select then from drop down list. Allows Qt Creator re-use this solution. See: - https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/ - http://blog.bethcodes.com/cmake-tips-tricks-drop-down-list Drop down values can be added to option via: SET_PROPERTY(CACHE OptionName PROPERTY STRINGS Option1 Option2 Option3) This solution should not restrict to provide any other value, it provides only suggestion for user to select one of prdefined values. Change-Id: I8fc52155775f1e04979db8206bb42363df9359e8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp
index 013f2c2bb8..4f0cd6ecbf 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildsettingswidget.cpp
@@ -26,6 +26,7 @@
#include "cmakebuildsettingswidget.h"
#include "configmodel.h"
+#include "configmodelitemdelegate.h"
#include "cmakeproject.h"
#include "cmakebuildconfiguration.h"
@@ -140,6 +141,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
m_configView->setSelectionBehavior(QAbstractItemView::SelectItems);
m_configView->setFrameShape(QFrame::NoFrame);
m_configView->hideColumn(2); // Hide isAdvanced column
+ m_configView->setItemDelegate(new ConfigModelItemDelegate(m_configView));
QFrame *findWrapper = Core::ItemViewFind::createSearchableWrapper(m_configView, Core::ItemViewFind::LightColored);
findWrapper->setFrameStyle(QFrame::StyledPanel);