Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Get private path in Qt
This article explains how to get the Symbian application private path where you can safely store application data.
Symbian applications store their data in a secure area, known as a "private directory", or data cage. Other applications cannot read/write this folder unless they have the manufacturer capability AllFiles - this is hard to obtain.
The private directory is located at \private\<sid>, where the SID is a special identifier that is unique to the application (usually the same value as the application UID). In Qt you will get full path of private folder using QDir::currentPath() method or QDesktopServices::storageLocation (QDesktopServices::DataLocation). Either method returns the absolute path of the application's current directory.
Converting path from Qt format to Symbian format
In pure Qt applications you can use the returned path directly. If you need to interact with Symbian code then you will need to read Converting between Qt and Symbian Directory Separators.