My app is called
unwallpaper and I would like to get its app data path:
qDebug() << QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
/home/sign/.local/share on Linux but what should be returned is
/home/sign/.local/share/<APPNAME>, according to Qt Document
Should I set APPNAME value somewhere? I am using Qt Creator with qmake. Thanks!
According to the application name docs:
If not set, the application name defaults to the executable name (since 5.0).
It’s strange that the returned path didn’t contain the
<APPNAME> at all.
Answered By – kefir500
Answer Checked By – Pedro (BugsFixing Volunteer)