
Originally Posted by
incapacitant
QSettings is initialised here :
ApplicationWindow::ApplicationWindow()
{
ApplicationWindow::ApplicationWindow()
: QMainWindow( 0 )
{
QCoreApplication::setOrganizationName("Adrien");
QCoreApplication::setApplicationName("EFREI SMS");
QSettings settings("efrei.ini", QSettings::IniFormat);
To copy to clipboard, switch view to plain text mode
This is a local variable, not the member of the class.
If I declare in private :
QSettings settings("efrei.ini", QSettings::IniFormat);
instead of
QSettings settings;
the compiler does not accept it.
Of course, this would be invalid.
Try this:
QCoreApplication::setOrganizationName("Adrien");
// you should put that in main.cpp //...
ApplicationWindow::ApplicationWindow()
{
QCoreApplication::setOrganizationName("Adrien"); // you should put that in main.cpp
QCoreApplication::setApplicationName("EFREI SMS"); // and this too
//...
ApplicationWindow::ApplicationWindow()
: QMainWindow( 0 ), settings("efrei.ini", QSettings::IniFormat)
{
To copy to clipboard, switch view to plain text mode
Bookmarks