문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top