Results 1 to 4 of 4

Thread: QSettings - .ini - and storing path to files

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: QSettings - .ini - and storing path to files

    And there is ToNativeSeperators and friends to convert back and forth, so no need to do it yourself.

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 37 Times in 36 Posts

    Default Re: QSettings - .ini - and storing path to files

    for example:
    Qt Code:
    1. lastPath = appSettings->value("myFilePath",QApplication::applicationDirPath()).toString();
    2. ...
    3. appSettings->setValue("myFilePath", QFileInfo(fn).absolutePath());
    To copy to clipboard, switch view to plain text mode 

    Qt hides platform specific stuff - just try it

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.