Qt for ios save file error? why?
-
wrote on 21 Apr 2024, 02:42 last edited by
"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 ? -
Hi,
Which version of Qt ?
Which version of iOS ?
What's the path ?
Does your application have proper permission to access storage ? -
@SGaist qt6.6 for ios 17.1 , I use QFileDioag::getOpenfilename achieve file path, but the path does not open
@kkgg How about answering last to questions?
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?wrote on 23 Apr 2024, 13:48 last edited by kkgg@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