开发者

Problem with selection rectangle

开发者 https://www.devze.com 2022-12-20 23:57 出处:网络
I am trying to make a customized listview in QT for the Symbia开发者_如何学Pythonn OS. However, I am facing some problems: I am able to draw everything like icons, text etc.. wherever I wish.

I am trying to make a customized listview in QT for the Symbia开发者_如何学Pythonn OS. However, I am facing some problems: I am able to draw everything like icons, text etc.. wherever I wish.

However, it is not getting selected by default.

To do selection, I need to draw the rectangle manually. It could be a problem if they got changed or some other stuff took place, however.

How would I get the default selection?


You probably want to call the setFocus() method which your listview inherits from QWidget.


I need to call the base class paint. Once the overridden function gets over, I need to call the base class paint.

0

精彩评论

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

关注公众号