ورود

View Full Version : مبتدی: Size Policy



smemamian
دوشنبه 26 فروردین 1392, 23:08 عصر
سلام دوستان

در بخشproperty editor قسمت Size Policy, تفاوت Preferred با Expanding چیه ؟! یجا نوشته بود :

Wants to Grow" "Uses Size Hint"
Preferred : No Yes
Expanding : Yes Yes


Wants to Grow" "Uses Size Hint چی هستن که Preferred ویژگی wants to grow رو داره ولی expanding نداره ؟

alamate_aoal
دوشنبه 26 فروردین 1392, 23:53 عصر
سلام

/*
QSizePolicy::Preferred
The sizeHint() is best, but the widget can be shrunk and still be useful.
The widget can be expanded, but there is no advantage to it being larger
than sizeHint() (the default QWidget policy).

QSizePolicy::Expanding
The sizeHint() is a sensible size, but the widget can be shrunk and still be useful.
The widget can make use of extra space, so it should get as much space as possible (e.g. the horizontal direction of a horizontal slider).

*/