开发者

qt - QAbstractItemView and [vertical/horizontal]ScrollMode

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜