Purpose of sizeHint() and minimumSizeHint() ? (solved)
General and Desktop
4
Posts
2
Posters
9.4k
Views
2
Watching
-
sizeHint : const QSize
This property holds the recommended size for the widget.minimumSizeHint : const QSize
This property holds the recommended minimum size for the widget. -
So which function takes precedence? sizeHint or minimumSizeHint
Or user have to explicitly call either function?hi
Both are used
When the widget is created the system uses sizeHint for how to big to make at start.
When the widget is resized ( by layout, by user dragging) the minimumSizeHint is used to
make sure it never becomes smaller than that.