[Qt-creator] CMakeProjectManager: support drop-down list for option value selection
Alexander Drozdov
adrozdoff at gmail.com
Mon Oct 10 02:14:43 CEST 2016
Hi all and Tobias especially :-)
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
- https://cmake.org/cmake/help/v3.3/prop_cache/STRINGS.html
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.
Note, delegate can be extended in future to support "editors" for FILEPATH
and DIRECTORY type options.
Code review with changes: https://codereview.qt-project.org/#/c/173340
--
WBR, Alexander Drozdov
http://htrd.su
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20161010/396f30a9/attachment.html>
More information about the Qt-creator
mailing list