Specifies that the given files should be empty in the resource file system
该特性在 Qt 6.6 引入。
注意: This property is in technology preview and may change in future releases.
When using the target-based variant of
qt_add_resources
or
qt_add_qml_module
, setting this property to
TRUE
causes the file contents to be omitted when creating the resource file system. The file name is retained.
This is useful if you want to strip QML source code from the binary.
注意: If you omit the QML source code from the binary, the QML engine has to rely on the compilation units created by qmlcachegen or qmlsc . Those are tied to the specific version of Qt they were built with. If you change the version of Qt your application uses, they can't be loaded anymore.
另请参阅 Qt 资源系统 .