Qt for ios save file error? why?
Unsolved
Qt 6
-
"device not open " Qt for ios
qDebug()<< "保存中"; QJsonDocument doc(obj_); QByteArray data = doc.toJson(); QFile file(path); file.open(QIODevice::WriteOnly);//打开文件 qDebug()<<file.error(); file.write(data);//开始写入数据进去 file.close(); qDebug()<< "保存结束";
-
Hi,
Which version of Qt ?
Which version of iOS ?
What's the path ?
Does your application have proper permission to access storage ? -
@kkgg How about answering last to questions?
What's the path ?
Does your application have proper permission to access storage? -
@jsulm Hello, I found that I need to use oc and qt for mixed compilation, but I can't add the Foundation framework in cmake. How should I add it?
I checked the information and he said that iOS can only read and write at the location "QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).last()"
5/5