我正在尝试优化一些 QML 代码以提高速度和内存。
我知道可以创建 Qt 资源文件 (*.rcc) 来减少 *.qml 文件空间。虽然我没有关于这一步获得多少改进/压缩的数字。
查看如何操作 Qt/QML Compiling libraries and resources
但是,我也知道它已经在 some people heads roadmap before将 QML 文件预编译为字节码,因此可以在运行时避免此步骤。
那么,有人知道是否可以在任何已发布的 Qt 版本中预编译 QML?或在任何计划?
最佳答案
使用 Qt 5.3 是可能的:
http://doc.qt.digia.com/QtQuickCompiler/
"The Qt Quick Compiler is a development add-on for Qt Quick applications which allows you to compile QML source code into the final binary. When you use this add-on, the application's startup time is significantly improved and you no longer need to deploy .qml files together with the application."
关于qt - QML预编译成字节码,有可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17070135/