Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Rasbian Buster Lite and QStandardPaths::AppConfigLocation



  • Hello.
    Faced this behavior:
    Create a new project and literally add three lines

    #include <QStandardPaths>
    #include <QDebug>
    
    // in main
    qDebug() << QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
    

    If we run project Ctr+R from Qt Creator, we get
    "/home/pi/.config/<APPNAME>"
    If we run project F5 from Qt Creator, we get
    "//.config/<APPNAME>"
    Why does the result of executing a command in a program differ depending on the method of launch?
    This is only on Raspberry, on x86_64 the result is the identical and corresponds to the documentation.

    Yes, this is cross compilation QT5.15 for Raspberry

    Thank you!


  • Moderators

    @fanate65
    a quick guess of mine would be that the $HOME env variable is missing in the second case



  • Everything is identical. One project, one environment. The only difference is in the method of launching Ctrl+R or F5.
    Where did the $HOME variable come from then in the first case?
    I would understand if the variable was missing in both cases. Or I switched Release / Debug, but I do not.
    Thank you!


Log in to reply