Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 14
Registered: ‎10-03-2011
My Device: 8520
My Carrier: asdf
Accepted Solution

Error creating File (Permission denied)



I'm trying to create a file and write in it some debug information of my application, but always return a QFileError on creating.


Some sample code:


QFile data("log.txt");
if (data.open(QFile::WriteOnly | QFile::Text)) {
        QTextStream out(&data);
        out << "Debug information";
	qDebug() << "Error opening log.txt: " << data.error();
	qDebug() << "Error description: " << data.errorString();

 This code return QFile:Smiley SurprisedpenError. Error description: "Permission denied"


How can I give it write permissions?


Thanks for the help.

Posts: 32
Registered: ‎05-30-2012
My Device: Blackberry 10 Alpha Device
My Carrier: Cosmote

Re: Error creating File (Permission denied)