Save data directly to the file .ini with QSettings

Hello

I want to directly record of QStrings in QSettings.

For testing purposes, I tried this.

void ApplicationUI::writeDataInQSettings() {  QSettings settings("app/native/assets/data/filepaths.ini", QSettings::IniFormat);
  QString filepath = "filepath";
  QVariant filename = "Filename";
  settings.setValue(filepath, filename);
  settings.sync();}

This code is in a function in C++ that I call in qml directly when the application is open.

I have permission to open the file in the path. I checked this with open with a C++ stream.

But when I run the code, and then open the ini file is still empty. What I'm missing here?

QSettings settings("app/native/assets/data/filepaths.ini", QSettings::IniFormat);

file Assets is read-only. You can only write to the folder data (which is btw: automatically used with QSettings)

then try this

QSettings settings("data/filepaths.ini", QSettings::IniFormat);

https://developer.BlackBerry.com/native/documentation/Cascades/device_platform/data_access/file_syst...

Tags: BlackBerry Developers

Similar Questions

  • Windows media player does not automatically open a video file on a Web site but I save it and open the file with Windows media player to play the video or audio recording.

    Windows media player does not automatically open a video file on a Web site but I save it and open the file with Windows media player to play the video or audio recording. I used to be able to play any video or audio file in any site!

    Hello

    Try resetting the default associations for WMP and IE.

    How to set default Associations for a program under Vista
    http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.html
    How to associate a file Type of Extension to a program under Vista
    http://www.Vistax64.com/tutorials/69758-default-programs.html

    If necessary:

    How Unassociate a Type of Extension file in Vista - and a utility to help
    http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.html
    Restore the Type Associations by default Vista file extensions
    http://www.Vistax64.com/tutorials/233243-default-file-type-associations-restore.html
    How to view and change an Extension of filename on Vista
    http://www.Vistax64.com/tutorials/103171-file-name-extension.html

    ====================================

    Also follow these steps:

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    ------------------------------------------------------------

    Then, if necessary:

    Have you recently installed another player?

    Reset your associations for WMP and IE.

    How to set default Associations for a program under Vista
    http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.html
    How to associate a file Type of Extension to a program under Vista
    http://www.Vistax64.com/tutorials/69758-default-programs.html

    ---------------------------------------------

    Do this to reregister the Jscript.dll and Vbscript.dll files.

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    type or copy and paste-> regsvr32 jscript.dll
    Press enter

    type or copy and paste-> regsvr32 vbscript.dll
    Press enter

    Restart and if all goes well, it will run now.

    --------------------------------------------------------------

    Have you recently added stores or ANY application from Stardock?

    Using 64-bit Vista?

    Can you think of recent things you did in WMP which could be the cause? You added another
    reader recently or an add-on for WMP?

    When I try to use Windows Media Player 11, the program does not start, or some UI elements
    are empty - a Mr Fixit
    http://support.Microsoft.com/kb/925704/en-us

    Maybe something here
    http://msmvps.com/blogs/chrisl/articles/17315.aspx
    and here
    http://msmvps.com/blogs/chrisl/Archive/2004/10/30/17399.aspx

    Check here the news of WMP11
    http://zachd.com/PSS/PSS.html

    I hope this helps.

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • name the file exported with date

    Hi, I use this command to export my schema

    exp file = c:\expdat.dmp med/med

    I think that if I use the same command over and over again, it will replace the old file with the new one? right?

    2. I want to name the file exported with the sysdate (date and time)? , and I think it's a way to create a new file and does not replace the old file.

    Thank you

    Here is an example of adding a date for a file name:

    > exp med/med file=c:\expdat.%date:~10,4%%date:~7,2%%date:~4,2%.dmp

    To add as a data and once, you just need something based on time that is unique, so try something like:

    > exp med/med file=c:\expdat.%date:~10,4%%date:~7,2%%date:~4,2%.%time:~1,1%%time:~3,2%%time:~6,2%%time:~9,2%.dmp

  • Exporting data, export to the file but cannot save

    Hi all,

    I have a user goes into basic shapes, exports data to form itself. Gets the exported data, but not the dialog to save the file or open it.

    As a matter of fact when the exporter stands... a browser window opens, then disappears within 1-2 seconds.

    But if you press the 'Ctrl' key continuous export and we get the file save or open the box.

    Originally, what is this place?



    Not tried.

    I thought that this problem has been awarded for pop up blocker. But the pop blocker has been disabled by using Internet Explorer.

    Other steps to study?

    Any help would be greatly appreciated.

    Please see the following threads:

    Export option in menu Apps does not work under Windows-XP OS
    Export option in menu Apps does not work under Windows-XP OS

    Export form data to Excel the FILE using file > EXPORT
    Re: Export form data to Excel file > EXPORT

    Export of data
    Exporting data...

  • Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Hello

    2796614 wrote:

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Of course, it is possible.  According to what the text file looks like to, you can create an external table that treats the text file as if it were a table.  Otherwise, you can always read the file in PL/SQL, using the utl_file package and INSERT of PL/SQL commands.

    You have problems whatever you wantt?  If so, your zip code and explain what the problem is.

    Whenever you have any questions, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the exact results you want from these data, so that people who want to help you can recreate the problem and test their ideas.  In this case, also post a small sample of the text involved file.

    If you ask about a DML operation, such as INSERT, then INSERT statements, you post should show what looks like the tables before the DML, and the results will be the content of the table changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

  • Transfer the file RAW with edited Information?

    I have Lightroom on my pc laptop and desktop (Windows Vista and Windows 7 64 bit respectively).  I copied a few Canon RAW CR2 files to my laptop in the field and edited some of the files.  Is it possible to transfer these changes, along with the files on my desktop pc?

    Probably do you a temporary LR catalog on the LT to make your changes, but your permanent catalog is on the DT?

    On your LT, if you use the library / metadata / save metadata to the files (plural) with selected images in the library grid, you should get an XMP file for each file CR2 containing the snapshot of adjustments when you perform the backup.  Copy the CR2 as well as the XMP file on your desktop, and when you import the changes will be part of the State of the initial import.  If you have already imported the files on your w/o the XMPs DT, then remove them from the library of DT (but not record) and reimport them after copying the XMP files above.

    If it is something unique, then the single transfer and CR2/XMP is ok.

    Depending on what else is in the your LT LR catalog, you can export a catalog, with just your images and their settings and import this catalog on your DT, change the paths to the images if necessary on the side of DT.

    Presumably, you know how to copy files (CR2s, XMPs, LRCATs) from your laptop to your desktop through a network or a USB drive connected, right?

    Either of these processes is a little messy.  If you do this on an ongoing basis then think about how to make the process as simple as possible.  What I do is have the LR catalog and images (for the last year, at least) on an external drive 1 TB USB3-speed that I bought at Best Buy, where drive letter is set to be the same on both computers I use LR on, and then I just plug in the USB drive to any computer I want to use at the moment.  I backup all the contents of the drive every night at a different speed USB3 drive so if I never forget that I'm wearing autour and destroy it, then I have another copy of everything.

    The initial copy took time, but changes in nightly replication does not take too long.  I use PTReplicator from KarenWare to plan a my pictures folder replication nightly at 02:00.  There are other similar programs to facilitate unidirectional replication such as RoboCopy SyncToy and DoubleTake.

  • What is the file brayhs with size zero?

    Original title: brayhs

    What is the file brayhs with size zero?
    How can I clean my system (windows Server 2003) this?

    Run a full scan of the system and set your PC to show hidden and system files and the folder and check if there is any suspicious element or just try to delete.

  • I lost all the file associaation, with the exception of aol, how do I add these files?

    I lost all the file associaation, with the exception of aol, how do I add these files?

    Hello

    1. what happens when you try to open a program?
    2. have you made changes on the computer recently?

    Try the steps listed in the article below and check.
    How to change or choose the program that starts when you double-click a file in Windows XP
    http://support.Microsoft.com/kb/307859

    I hope this helps.

  • DVD how much we need for the files backup with backup and restore program?

    Hello how are you?
    DVD how much we need for the files backup with backup and restore program? Y at - it large differences in the time and space between write backups on DVD and external hard drive?

    I do not understand your question.  Asked how the space has been used on your C: drive and you answered 60 GB.  Now you say your PARTITION C: is 60 GB with only 20 GB used?  I really don't understand what you're so confused.  It's simple arithmetic grade 3rd.  What is space you USED on the C: drive, that multiply by 0.7 to obtain the amount of space will be used on your backup disk after compression.  Divide this number by 4.7 and round.  That's how many DVDs you'll need if you insist on the use of DVDs for backup.  Then

    (1) If you are using 60 GB, the answer is (60 x.7) / 4.7 = 8.936.  I rounded up to 9 and added 1 just to be sure.

    (2) If you use only 20 GB, the answer is (20 x.7) / 4.7 = 2.97 rounded up to 3.  Add 1 and get 4.

    If you use only 20 GB, I am very surprised, because almost any important installation of Windows 7 is going to take more than 20 GB.

    All of this assumes that you do NOT use the Windows backup and restore program, but one that I recommended.  When I used the windows one, the results were several times the space that I used on my C: partition.

    Good luck.

  • How to save all the files associated with a Web site?

    I'm an administrator (but not the creator) of a Web site that I am responsible for the update. I don't have the documentation that I need to do some of my tasks. So I thought that I could find enough simply to save the site from Firefox.
    The last time that I have this (several versions of Firefox there is), there is a command "save under" which would save the main HTML file in your selected folder AND save all the subsidiary referenced files in a single subfolder, so built a local version of the site.
    When I tried this today in v20.0.1, the two options "Save As" only created a single file of the current page with all the original references links on the left.
    Is there another way to 'dumping' of the entire application on my hard drive?

    I initially save as "Web Page, complete"? , but the hrefs all mentioned on the real web site, not to any local versions.

    I also tried the Scrapbook addon. It does not seem to do what I want, but I can't find where it stored all the files. I'll be back with the author of the album.

    PS. Why can't I find setting controls in shape when you enter a question?

  • How to find the number of data items in a file written with the ArryToFile function?

    I wrote a table of number in 2 groups of columns in a file using LabWindows/CVI ArrayToFile... Now, if I want to read the file with the FileToArray function so how do I know the number of items in the file. during the time of writing, I know how many elements array to write. But assume that I want the file to be read at a later time, then how to find the number of items in the file, so that I can read the exact number and present it. Thank you all

    Hello

    I start with the second question:

    bytes_read = ReadLine (file_handle, line_buffer, maximum_bytes);

    the second argument is the buffer to store the characters read, so it's an array of characters; It must be large enough to hold maximum_bytes the value NULL, if char [maximum_butes + 1]

    So, obviously the number of lines in your text tiles can be determined in a loop:

    Open the file

    lines = 0;

    While (ReadLine () > 0)

    {

    lines ++;

    }

    Close the file

  • Path of the file saved with "save under" Action is fixed?

    I am trying to create an action that will save the file open for a JPG file (quality 9, Matte: None), always in the same folder it comes, as it does when this is done manually. (The preference on save slot in the original folder is enabled).

    What I find is that when the action is saved, the path to the folder at the moment is fixed in action, rendering it useless for other backups of open files in different folders.

    Is it possible to not save a path when recording the Save action under or make variable so who adopts the folder that was chosen was the command was called manually?

    TIA, Joel.

    Photoshop CS5 Mac

    Mac OS X 10.6.4

    MacBook Pro 17 "2.4GHz/4GB/320GB

    Muppet Mark quite succinctly explains the relative merits of AppleScript and JavaScript for Photoshop-automation in this thread:

    http://forums.Adobe.com/thread/755858?TSTART=0

  • How to save data quickly to the high sampling frequency

    Hi all

    I use a structure of producers and customers to measure and record the data. The sampling rate must be as high as 10 kHz. Given that so much data, it takes a long time before the data is saved. At first, I saved the data in an excel sheet. Then I tried to save it in binary, but it still takes a while to complete save. How can I make the time savings a short circuit?

    Thank you

    The best

    First we will make some corrections to your DAQmx code.  Since you are using continuous sampling, do NOT connect the samples per channel.  Which is actually limiting your buffer.  And there is really no need to define your buffer size either.  It is default to very big, so this isn't a problem as long as you read your data quite often.

    Now your data connection... You simply create a very wide range while acquiring data.  Then, you save the data.  It's actually not through the advantage of using the producer and the consumer.  You should save your data in the loop of the consumer.  It will be elinate need a lot of memory and you save the data to the file while you are buying.

    But, in this case, I say that the producer and the consumer is not even necessary.  Use the DAQmx Configure registration VI.  With this VI, you can tell DAQmx to disseminate all data directly in a PDM file.  You don't have to do anything.  It is by far the best way to save on your DAQ data.

  • write the file wav with power button

    Hi all

    I am trying to record a wav file at a push of a button with Auto name files.

    The idea is the VI is running, display data when recording key data are saved as wav up to what the key once again. The file name is generated with the date and time automatically. The user can create as many record as he or she wants without stop the VI.

    As you can guess, I'm not a good labview programmer and I have a problem because my VI does not work properly. The return registered wav file are huge they seem to hold too much data essentially. When I play it back it sounds loop. I understand that the problem is with my VI. Believe me, I've been trying and trying without success. Could someone have a look please and let me know what the problem. I do not understand how to operate the part save my VI.

    Please find attached my VI.

    Thanks in advance for your help.

    Frédéric.

    Yes, our solutions are remarkably similar.

    Be careful to close files when you have finished writing for them - I'm not sure that you have done this. You placed a fence outside the loop that will only close the most recently created file.

    Kind regards

  • Save data directly to Excel

    Hello!

    Often, when I save data, I saved them as a text file. But sometimes, you have to show them directly as excel file. In this case, save the data first, then read like a report in Excel.
    I want to know is why you can't save files directly in Excel. It's just for curiosity.

    Thanks for your answers,

    Best regards

    Samuel G


Maybe you are looking for