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
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to