PDA

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



smemamian
سه شنبه 27 فروردین 1392, 00: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
سه شنبه 27 فروردین 1392, 00: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).

*/