Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top