Struct qmetaobject::QSettings
source · #[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) -> QSettings
pub fn new(organization: &str, application: &str) -> QSettings
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) -> QSettings
pub fn from_path(file_name: &str) -> QSettings
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 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