Can someone explain the size hint, size policy, size limit in QT?

Can someone give a clear explanation of this concept? What is the difference and how to use them?

+6
source share
1 answer
Size hint

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

Size policy

describes how size can change if the preferred size cannot be used (can stretch or shrink), see the QSizePolicy :: Policy section for a description of each.

size limit is the maximum size and minimum size of a widget.

+11
source

Source: https://habr.com/ru/post/959166/


All Articles