Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Can a QML file refresh a JS import at runtime?

$
0
0
Is there a way to have a QML file re-import a JS file at runtime? For example, I have this line at the top of a QML file: import "qrc:/someJSfile.js" as MyJS Now, suppose new functions are added, or existing functions are edited in that JS file while the Qt app is running. Javscript is a dynamic language that offers runtime evaluation, but I wonder how I could have the QML file “refresh” its knowledge of those functions without restarting the app?

Viewing all articles
Browse latest Browse all 4972

Trending Articles