Can QML caching in Qt 5.8 be disabled for a particular project?

前端 未结 2 650
庸人自扰
庸人自扰 2021-02-13 09:07

Qt 5.8 was supposed to come with the optional use ahead of time qtquick compiler, instead it arrived with a sort-of-a-jit-compiler, a feature that\'s enabled by default and cach

2条回答
  •  感动是毒
    2021-02-13 09:53

    Credit to peppe for informing us of the environment variable, but qputenv()only takes a QByteArray as the value parameter, so 1 won't work.

    The two options that work:

    qputenv("QML_DISABLE_DISK_CACHE", "1"); // or
    qputenv("QML_DISABLE_DISK_CACHE", "true");
    

    This successful disables the cache and prevents the associated bugs from manifesting.

提交回复
热议问题