[][src]Struct qt_widgets::q_size_policy::Policy

#[repr(transparent)]pub struct Policy(_);

This enum describes the various per-dimension sizing types used when constructing a QSizePolicy.

C++ enum: QSizePolicy::Policy.

C++ documentation:

This enum describes the various per-dimension sizing types used when constructing a QSizePolicy.

See also PolicyFlag, setHorizontalPolicy(), and setVerticalPolicy().

Methods

impl Policy[src]

pub fn to_int(&self) -> c_int[src]

impl Policy[src]

pub const Fixed: Policy[src]

The QWidget::sizeHint() is the only acceptable alternative, so the widget can never grow or shrink (e.g. the vertical direction of a push button). (C++ enum variant: Fixed = 0)

pub const Minimum: Policy[src]

The sizeHint() is minimal, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g. the horizontal direction of a push button). It cannot be smaller than the size provided by sizeHint(). (C++ enum variant: Minimum = 1)

pub const Maximum: Policy[src]

The sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g. a separator line). It cannot be larger than the size provided by sizeHint(). (C++ enum variant: Maximum = 4)

pub const Preferred: Policy[src]

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). (C++ enum variant: Preferred = 5)

pub const MinimumExpanding: Policy[src]

The sizeHint() is minimal, and sufficient. 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). (C++ enum variant: MinimumExpanding = 3)

pub const Expanding: Policy[src]

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). (C++ enum variant: Expanding = 7)

pub const Ignored: Policy[src]

The sizeHint() is ignored. The widget will get as much space as possible. (C++ enum variant: Ignored = 13)

Trait Implementations

impl Clone for Policy[src]

impl Copy for Policy[src]

impl Debug for Policy[src]

impl Eq for Policy[src]

impl From<Policy> for c_int[src]

impl From<i32> for Policy[src]

impl PartialEq<Policy> for Policy[src]

impl StructuralEq for Policy[src]

impl StructuralPartialEq for Policy[src]

Auto Trait Implementations

impl RefUnwindSafe for Policy

impl Send for Policy

impl Sync for Policy

impl Unpin for Policy

impl UnwindSafe for Policy

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.