#include <QtWidgets/QApplication>
#include <QWidget>
#include <QSettings>
#include <QString>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSettings *configIniWrite = new QSettings(QCoreApplication::applicationDirPath()+"/configfile.ini", QSettings::IniFormat);
configIniWrite->setValue("/ip/first", "192.168.0.1");
configIniWrite->setValue("ip/second", "127.0.0.1");
configIniWrite->setValue("port/open", "2222");
QString first_ip = configIniWrite->value("ip/first").toString();
QString second_ip = configIniWrite->value("ip/second").toString();
QString port_open = configIniWrite->value("port/open").toString();
delete configIniWrite;
return a.exec();
}