pub struct CheckBox { /* private fields */ }Expand description
A retained two-state checkbox widget.
Implementations§
Source§impl CheckBox
impl CheckBox
Sourcepub fn set_checked(&self, checked: bool)
pub fn set_checked(&self, checked: bool)
Set the checked state programmatically.
Sourcepub fn toggled(&self) -> EventStream<bool>
pub fn toggled(&self) -> EventStream<bool>
A stream of toggle events carrying the new checked state.
Sourcepub fn on_toggle<F>(&self, f: F) -> &CheckBox
pub fn on_toggle<F>(&self, f: F) -> &CheckBox
Register a toggle handler carrying the new checked state.
Sourcepub fn bind_checked(&self, signal: &Signal<bool>)
pub fn bind_checked(&self, signal: &Signal<bool>)
Bind the checked state to a signal.
Source§impl CheckBox
impl CheckBox
Sourcepub fn set_visible(&self, visible: bool)
pub fn set_visible(&self, visible: bool)
Show or hide the widget.
Sourcepub fn bind_visible(&self, signal: &Signal<bool>)
pub fn bind_visible(&self, signal: &Signal<bool>)
Bind the visibility to a signal. The binding lives in the component’s owner and is released when the widget is destroyed.
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Whether the widget is currently visible on screen.
Sourcepub fn qobject_ptr(&self) -> *mut Void
pub fn qobject_ptr(&self) -> *mut Void
Escape hatch: the underlying Qt QWidget pointer.
The pointer is valid only while this handle’s Qt object is alive. Do not retain it after destruction or use it from a thread other than the GUI thread. Dereferencing or passing the pointer across FFI remains unsafe.
Sourcepub fn set_style_class(&self, style_class: impl AsRef<str>)
pub fn set_style_class(&self, style_class: impl AsRef<str>)
Set an application-defined style class for scoped Qt style-sheet rules.
This leaves the platform style untouched unless the application supplies
matching rules through crate::Application::set_style_sheet.
Sourcepub fn bind_style_class(&self, signal: &Signal<String>)
pub fn bind_style_class(&self, signal: &Signal<String>)
Bind the style class to a signal, keeping the class derived from state instead of toggled imperatively.