Struct rute::auto::spacer_item::SpacerItem
source · pub struct SpacerItem<'a> { /* private fields */ }
Expand description
Notice these docs are heavy WIP and not very relevent yet
Normally, you don’t need to use this class directly. Qt’s built-in layout managers provide the following functions for manipulating empty space in layouts:
-
Class
-
Functions
-
QHBoxLayout
-
addSpacing() , addStretch() , insertSpacing() , insertStretch()
-
QGridLayout
-
setRowMinimumHeight() , setRowStretch() , setColumnMinimumWidth() , setColumnStretch()
See also: Layout
[WidgetItem
]
LayoutItem::spacer_item
Licence
The documentation is an adoption of the original Qt Documentation and provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Implementations
sourceimpl<'a> SpacerItem<'a>
impl<'a> SpacerItem<'a>
sourcepub fn change_size(&self, w: i32, h: i32, h_data: Policy, v_data: Policy) -> &Self
pub fn change_size(&self, w: i32, h: i32, h_data: Policy, v_data: Policy) -> &Self
Changes this spacer item to have preferred width w, preferred height h, horizontal size policy hPolicy and vertical size policy vPolicy.
The default values provide a gap that is able to stretch if nothing else wants the space.
Note that if changeSize() is called after the spacer item has been added to a layout, it is necessary to invalidate the layout in order for the spacer item’s new size to take effect.
See also: SpacerItem::invalidate
sourcepub fn minimum_size(&self) -> Size<'_>
pub fn minimum_size(&self) -> Size<'_>
sourcepub fn maximum_size(&self) -> Size<'_>
pub fn maximum_size(&self) -> Size<'_>
sourcepub fn expanding_directions(&self) -> Orientations
pub fn expanding_directions(&self) -> Orientations
sourcepub fn spacer_item(&self) -> Option<SpacerItem<'_>>
pub fn spacer_item(&self) -> Option<SpacerItem<'_>>
Returns a pointer to this object.
sourcepub fn size_policy(&self) -> SizePolicy<'_>
pub fn size_policy(&self) -> SizePolicy<'_>
Returns the size policy of this item.
pub fn build(&self) -> Self
Trait Implementations
sourceimpl<'a> Clone for SpacerItem<'a>
impl<'a> Clone for SpacerItem<'a>
sourcefn clone(&self) -> SpacerItem<'a>
fn clone(&self) -> SpacerItem<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more