#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QSettings>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QSettings * qsettings = new QSettings(":/config.ini",QSettings::IniFormat);
bool status = qsettings->value("preview","").toBool();
qDebug() << status;
}
MainWindow::~MainWindow()
{
delete ui;
}
Once i could do it but now i don't know whats wrong. When i googled this problem i just saw that this impossible but i enshure that i did it before.
This works like a charm for me:
main.qrc
main.cpp
main.pro
Build and Run
Output