Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在运行时使用opencv处理图像并希望使用imageView在QML中显示该图像的更新版本,我目前正在运行时创建一个新的图像文件并将其路径重新分配给QML中的imageView,有没有更好的方法这个?
如果我正确理解了这个问题,我会通过连接从 c++ 代码发出的更改信号并将其连接到强制在 qml 端重新加载的接收器来做到这一点:
// MyImage.qml Image { cache: false function reload() { var tmpSource = source; source = ""; source = tmpSource; } }