Q_OS_LINUX and Q_OS_ANDROID.
Mobile and Embedded
3
Posts
2
Posters
10.5k
Views
1
Watching
-
I am testing version 5.2 and 5.3 and have noticed no difference what operating system are you using and Q_OS_ANDROID Q_OS_LINUX.
this is the code I've tried.
@QStringList myOpenFile;
QString mypath = QDir::currentPath();
#ifdef Q_OS_WIN32
myOpenFile << mypath+"/myfiles/oth/file.txt";
#endif
#ifdef Q_OS_LINUX
myOpenFile << mypath+"/myfiles/oth/file.txt";
#endif
#ifdef Q_OS_ANDROID
myOpenFile << "/mnt/sdcard/myfiles/oth/file.txt";
#endif
@
using qDebug obtain two outputs:qDebug() << myOpenFile;
/data/data/com.example.myprogra/files/myfiles/oth/file.txt
/mnt/sdcard/myfiles/oth/file.txtThis error only happens on android.