Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 298
Alston Avatar asked Dec 02 '13 12:12

Alston


1 Answers

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.

like image 90
ratchet freak Avatar answered Sep 20 '22 13:09

ratchet freak