#[repr(C)]pub struct QSettings { /* private fields */ }
Expand description
Wrapper around QSettings
class.
Implementations§
Source§impl QSettings
impl QSettings
Sourcepub fn new(organization: &str, application: &str) -> Self
pub fn new(organization: &str, application: &str) -> Self
Wrapper around QSettings(const QString &organization, const QString &application = QString(), QObject *parent = nullptr)
constructor.
Note: Under the hood it uses QSettings(format, scope, org, app)
(like Qt does internally already),
with setting format
set to IniFormat
and scope
to (default) UserScope
Sourcepub fn from_path(file_name: &str) -> Self
pub fn from_path(file_name: &str) -> Self
Wrapper around QSettings(const QString &fileName, QSettings::Format format, QObject *parent = nullptr)
constructor.
pub fn filename(&self) -> String
pub fn contains(&self, key: &str) -> bool
pub fn value_bool(&self, key: &str) -> bool
pub fn set_bool(&mut self, key: &str, value: bool)
pub fn value_string(&self, key: &str) -> String
pub fn set_string(&mut self, key: &str, value: &str)
pub fn sync(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QSettings
impl RefUnwindSafe for QSettings
impl Send for QSettings
impl Sync for QSettings
impl Unpin for QSettings
impl UnwindSafe for QSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more