×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    QSettings is not clearing or removed on device.

    Hi,

    I am using QSettings for storing some data and using :

    QCoreApplication::setOrganizationName("OrgName");
    QCoreApplication::setApplicationName("App Name");

    Now I am clearing this settings when my application exits using:

    settings.remove("Key Name");

    have also tried settings.clear();

    This works fine on simulator but on device though clearing these settings, next time when i launch the app settngs still remains , So can any one tell me why this happens only on device but not with simulator I am using E-7.

    Thanks With Regards,

    Vishal.

  2. #2
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Re: QSettings is not clearing or removed on device.

    Hi all,

    I resolved my above issue by using sync() method of QSettings , one must use this method after using QSettngs::clear() or QSettings::remove("Key Name") so that changes should be reflected in .config file which is created in device. Which was not happening before, It was just clearing values in QSettings object but not in file.

    Though sync() method is automatically called by QSettings destructor.

    Thanks With Regards,
    Vishal

Similar Threads

  1. QSettings API for persistent
    By narendar_discover in forum [Archived] Beginning Qt
    Replies: 4
    Last Post: 2011-02-17, 07:11
  2. QSettings
    By waelfarouk in forum Qt
    Replies: 2
    Last Post: 2011-01-27, 08:21
  3. Publication date removed from device specs?
    By lahtir in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 1
    Last Post: 2008-12-06, 15:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×