简体   繁体   English

QML 来自QPixmap的背景

[英]QML background from QPixmap

How can I set a background using C++ object declared in QML file that returns QPixmap by one of its methods.如何使用在 QML 文件中声明的 C++ object 设置背景,该文件通过其中一种方法返回 QPixmap。

you need to implement QDeclarativeImageProvider, here is sample code.您需要实现 QDeclarativeImageProvider, 这里是示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM