如何更改QScrollbar中箭头QPushButton的滚动距离?

How to change the scroll distance of the arrow QPushButton in a QScrollbar?

提问人:Zic 提问时间:9/1/2023 最后编辑:Richard EbelingZic 更新时间:9/6/2023 访问量:52

问:

如何更改单击滚动条上的QPushButton时滚动的距离?

screenshot of the GUI with a scrollbar on the right and the bottom arrow-down / scroll-down button marked

它是 1 x 1,例如,我想将其更改为 5 x 5。 我已经尝试过了,但它们没有用。setPageStepsetSingleStep

C++ qt qtablewidget qscrollbar

评论

1赞 Abderrahmene Rayene Mihoub 9/2/2023
我尝试了这个最小的可重现示例,似乎只有在调用后才能使用 .您能否验证您的程序是否也是这种情况?如果没有,请提供一个最小的可重现示例,您正在使用的操作系统和Qt版本。我使用 Qt 6.5.0 和 6.5.2 在 KDE Neon 上进行了测试。setSingleStepshow

答: 暂无答案