QT QSizePolicy::SizeType的用法

阅读: 评论:0

QT QSizePolicy::SizeType的用法

QT QSizePolicy::SizeType的用法

The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
类QSizePolicy 是描述水平和垂直修改大小策略的一种而已属性

QSizePolicy::SizeType
The per-dimension sizing types used when constructing a QSizePolicy are:

QSizePolicy::Fixed - the QWidget::sizeHint() is the only acceptable alternative, so the widget can never grow or shrink (e.g. the vertical direction of a push button).
缺省大小(sizehint)是唯一可以接收的改变,因此定义这种类型部件不会发生任何改变。

QSizePolicy::Minimum - the sizeHint() is minimal, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g. the horizontal direction of a push button).
缺省大小定义的部件最小大小,并且是充分的。部件允许扩展,但是并不倾向扩展。

QSizePolicy::Maximum - the sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g. a separator line).
缺省大小定义的部件是最大的,假如其它部件需要空间并且不会破坏这个部件,那么该部件允许缩小。

QSizePolicy::Preferred - the sizeHint() is best, but the widget can be shrunk and still be useful. The widget can be expanded, but there is no advantage to it being larger than sizeHint() (the default QWidget policy).
缺省大小是最佳效果,部件允许扩展或缩小,但并倾向于扩展(缺省策略)。

QSizePolicy::Expanding - the sizeHint() is a sensible size, but the widget can be shrunk and still be useful. The widget can make use of extra space, so it should get as much space as possible (e.g. the horizontal direction of a slider).
缺省大小是合理的大小,但部件允许缩小并且可用。这个部件可以利用额外的空间,因此它将会得到尽可能多的空间。

QSizePolicy::MinimumExpanding - the sizeHint() is minimal, and sufficient. The widget can make use of extra space, so it should get as much space as possible (e.g. the horizontal direction of a slider).
缺省大小是部件最小大小,并且是足够的。这个部件允许使用额外空间,因此它将会得到尽可能多的空间。

QSizePolicy::Ignored - the sizeHint() is ignored. The widget will get as much space as possible.
缺省大小将会被忽略,这个部件会得到尽可能多的空间。

本文发布于:2024-02-02 20:24:24,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170687666546231.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:QT   QSizePolicy   SizeType
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23