Can someone explain size hint, size policy, size constraint in QT?

人盡茶涼 提交于 2019-12-12 10:36:43

问题


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


回答1:


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.

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



来源:https://stackoverflow.com/questions/20327855/can-someone-explain-size-hint-size-policy-size-constraint-in-qt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!