Important: Please read the Qt Code of Conduct -

[Solved] Program exited with code -1073741819

  • Hi all!

    I am just trying to save QCheckBox state with QSettings.

    this is the code

    @void Set::readSettings()
    QSettings settings("CStudioS", "test1");
    QPoint pos = settings.value("pos", QPoint(200,200)).toPoint();
    bool check = settings.value("check", true).toBool();
    checkBox->setChecked(check); // debuger says an error in here

    void Set::writeSettings()
    QSettings settings("CStudioS", "test1");
    settings.setValue("pos", pos());
    settings.setValue("check", checkBox->isChecked());

    void Set::closeEvent(QCloseEvent *event)

    But i'm getting an error and program exited with code -1073741819.

    Help me! thanks

  • Sorry. My bad! I had called readSetting() function before checkBox initialized . Sorry again. Problem solved!

  • Moderators

    Glad you got it working. Be sure and edit your initial post to add [Solved] to the title. Thanks!

Log in to reply