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.
我正在处理的应用程序在 QListView 中放置了 QStandardItems。我想在绑定在列表视图中的 QStandardItem 上设置透明图像。如何在 QListView 项目上设置叠加图像?
创建自定义委托。以下一种方式覆盖 paint() 方法:
1) QItemDelegate::paint(默认参数...);
2)p->drawPixmap(你的叠加图像)