开发者

Qt - How to use rich text in a QComboBox?

开发者 https://www.devze.com 2022-12-23 05:15 出处:网络
I am trying to use 开发者_运维知识库rich text in a QComboBox but it does not support it. Perhaps I should write a subclass? But I am unsure on what I would need to override as I have never done anythi

I am trying to use 开发者_运维知识库rich text in a QComboBox but it does not support it. Perhaps I should write a subclass? But I am unsure on what I would need to override as I have never done anything like this before. Please help. Thanks!


I think custom delegate class is the answer. The solution is to simply replace standard drawing routine with your own (using i.e. QLabel). There was a similar question here: QListView/QListWidget with custom items and custom item widgets

0

精彩评论

暂无评论...
验证码 换一张
取 消