-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.cpp
More file actions
27 lines (24 loc) · 778 Bytes
/
settings.cpp
File metadata and controls
27 lines (24 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "settings.h"
#include <QDebug>
#include <QCoreApplication>
Settings::Settings(QObject *parent) : QObject(parent)
{
// QSettings settings("MyOrg", "MyApp");
// settings = new QSettings("MyOrg", "MyApp");
// QCoreApplication::setOrganizationName("MySoft");
// QCoreApplication::setOrganizationDomain("mysoft.com");
// QCoreApplication::setApplicationName("Star Runner");
}
void Settings::newSetting(QString keyname, QVariant value)
{
QSettings settings;
settings.setValue(keyname, value);
qDebug() << "set value to new setting";
}
void Settings::getSetting(QString keyname)
{
// int value = settings->value(keyname).toInt();
QSettings settings;
int value = settings.value(keyname).toInt();
qDebug() << "got setting: " << value;
}