I found a video which shows something which is called 'realtime programming' in the video.
This can be seen here.
I think the idea is to edit QML files while the applications is running. As soon as changes are saved the application shows this changes immediately.
This eliminates the need of restarting the application to see the changes.
I think this is really great because it speeds up the work flow.
But I don't really get it how this works. What do I have to do to make something like this works on a Windows environment?
QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications.
Coding with QML + JavaScript is very easy to learn and allows to reduce the required amount of code a lot. Language concepts like states, signals or property bindings are a huge time-saver. QML makes adding animations simple. You can animate every property of your QML types with simple Animation components.
QML is designed to be easily extensible through C++ code. The classes in the Qt QML module enable QML objects to be loaded and manipulated from C++, and the nature of QML engine's integration with Qt's meta object system enables C++ functionality to be invoked directly from QML.
QML (Qt Modeling Language) is a user interface markup language. It is a declarative language (similar to CSS and JSON) for designing user interface–centric applications.
See this answer on how to reload a QML file:
engine()->clearComponentCache();
setSource(source());
Now all you need to do is hook that up to a QFileSystemWatcher
. Make QFileSystemWatcher
watch your QML file, and when it changes, reload the view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With