Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Program exited with code -1073741819
Forum Updated to NodeBB v4.3 + New Features

[Solved] Program exited with code -1073741819

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chamoda
    wrote on 1 Oct 2012, 16:02 last edited by
    #1

    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();
    move(pos);
    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)
    {
    writeSettings();
    event->accept();
    }@

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

    Help me! thanks

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chamoda
      wrote on 1 Oct 2012, 16:06 last edited by
      #2

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on 1 Oct 2012, 18:04 last edited by
        #3

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

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0

        1/3

        1 Oct 2012, 16:02

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved