当图片很大时,加载图片可能导致UI线程的阻塞,为了确保图片在加载过程中不会阻塞UI线程,将Image元素的’asynchronous’设置为true
Image {
asynchronous: true
source: "test.png"
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/204285.html原文链接:https://javaforall.net
Qml异步加载图片「建议收藏」当图片很大时,加载图片可能导致UI线程的阻塞,为了确保图片在加载过程中不会阻塞UI线程,将Image元素的’asynchronous’设置为trueImage{asynchronous:truesource:"test.png"}…
当图片很大时,加载图片可能导致UI线程的阻塞,为了确保图片在加载过程中不会阻塞UI线程,将Image元素的’asynchronous’设置为true
Image {
asynchronous: true
source: "test.png"
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/204285.html原文链接:https://javaforall.net