开发者

qt - QAbstractItemView and [vertical/horizontal]ScrollMode

开发者 https://www.devze.com 2023-03-23 03:28 出处:网络
QAbstractItemView features setters/getters for vertical and horizontal scroll model. possible values are: ScrollPerItem and ScrollPerPixel.

QAbstractItemView features setters/getters for vertical and horizontal scroll model. possible values are: ScrollPerItem and ScrollPerPixel.

I'm using QListView with a custom model. The problem is that changing vertical scroll mode does not affect the way the contents are scrolled. The view is in QListView::IconMode. It appears that the scrolling is done per pixel. But because of mouse wheel clicks it actually scrolls per fixed pixel batches, which do not depend on 开发者_开发百科the size of the items - even in the ScrollPerItem mode.

I need to scroll per item - each wheel click should scroll to the next row of items no matter what the size of the item is. Is it possible with default QListView implementation?

0

精彩评论

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

关注公众号