有人可以解释QT中的大小提示,大小策略,大小限制吗? [英] Can someone explain size hint, size policy, size constraint in QT?

查看:314
本文介绍了有人可以解释QT中的大小提示,大小策略,大小限制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以对这3个概念进行清楚的解释吗?有什么区别以及如何使用它们?

Can anyone give a clear explain of these 3 concept? What's the difference and how to use them?

推荐答案

大小提示是小部件的首选大小,布局将尝试使其尽可能接近该大小.

size hint is the preferred size of the widget, layouts will try to keep it as close to this as possible.

大小政策描述了无法使用首选大小(可以拉伸或缩小)时大小如何变化的方法,请参见

size policy describes how the size may change when the preferred size cannot be used (can it stretch or shrink) see the QSizePolicy::Policy enum for a description of each.

大小约束是小部件可以达到的maximumSize和minimumSize.

size constraint are the maximumSize and minimumSize the widget can be.

这篇关于有人可以解释QT中的大小提示,大小策略,大小限制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆