How to detect QML design mode in Qt Creator
-
I want to use some design(test) data for my UI
is it possible to detect Qt Creator from javascript somehow?
Or how we can test UI design with some design data in Qt Creator design mode ? -
I get this answer somewhere else
Thomas Hartmann says:
December 10, 2014 at 15:36
If you need complex backend data or models, then you can do what is described here: http://blog.qt.digia.com/blog/2011/07/28/mockup-data-for-the-qml-designer/But with Qt Creator 3.3 we introduced a new ui.qml file format. In this case your code is split into full QML and a subset (in the .ui.qml file) for the designer. Then you can define any values and even models in the .ui.qml file and overwrite those in the qml file that contains the implementation.
See: http://doc-snapshot.qt-project.org/qtcreator-3.3/creator-quick-ui-forms.html