开发者

QT: Complete control "Owner drawing" over QListWidget rows

开发者 https://www.devze.com 2023-02-17 17:26 出处:网络
I need a view that’s something like Skype’s contact view. List of names, with an image at their side, and some buttons that become visible as you select a row. Using QListWidgetItem does answer some

I need a view that’s something like Skype’s contact view. List of names, with an image at their side, and some buttons that become visible as you select a row. Using QListWidgetItem does answer some of these requirements but is severely limited, by icon width and others.

One other thing that’s less of a priority — QListWidget scrolls in rigid steps. The scroll is not smooth and you can never see “half a row” like you can in Skype. It’s like QListWidget scrolls up and down in row-hei开发者_JAVA百科ght steps, while Skype scrolls in single pixels. Much smoother and pleasing from a UX standpoint. I know Skype is QT. Are they using a different control for this?

How do I achieve complete control over the drawing of a row in QListWidget?


For better scrolling you can try to set verticalScrollModel.

0

精彩评论

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

关注公众号