Reputation: 1967
I have found the documentation for using the new feature in Qt 5.9 for generating QML cache files (.qmlc/.jsc) ahead-of-time with a QMake project, but what's the procedure for doing so with a CMake based project?
Upvotes: 3
Views: 695
Reputation: 11
I had a alternative for that.
Don't know about your project structure. But you can generate ahead-of-time QML cache. For QML's you want to create cache, just place those QML's in the form of component in main.qml file. For example:
ApplicationWindow {
.........
Item{
.......
Component{Page1{}}
Component{Page2{}}
}
}
By using that it would pre-compile given QML's and would generate ahead-of-time cache for them. And could have warm start for that given components. It does not have any negative impact on app, but positive off-course.
If you don't know to access QML's from sub-directories in main.qml. Use:
import "dir_name"
Upvotes: 1