如何获取QSpinBox按钮的大小
有没有办法获得 Qt QSpinBox 的按钮/箭头的大小?
注意:这个问题与更改 QSpinBox 的样式无关。相反:目的是使用给定的 QSpinBox 样式并在运行时获取其按钮/箭头的大小,对于不同的平台,该大小会有所不同,以便微调 QSpinBox 是其中一个组件的布局约束。
另外:QStyle 类似乎没有提供按钮/箭头大小的 PixelMetric 值。
Is there a way to obtain the size of the buttons/arrows of a Qt QSpinBox?
Note: This question has nothing to do with changing the style of a QSpinBox. On the contrary: The intent is to use the QSpinBox style as given and obtain at runtime the size of its buttons/arrows, which will be different for different platforms, for the purpose of fine tuning the layout constraints in which the QSpinBox is one component.
Also: The QStyle class does not appear to provide PixelMetric values for the button/arrows sizes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论