View Single Post
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#36
Originally Posted by danielwilms View Post
Thought about it at first too, but mad-developer executes the program as user, even though it uses "developer" to login over ssh to it.

Daniel
Doesn't work for me.

Code:
#include <QtGui/QApplication>
#include <QtCore/QDir>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QByteArray homePath = QDir::homePath().toUtf8();
    printf("Home Path: %s\n", homePath.constData());

    return 0;
}
Starting with QtCreator as "developer": Home Path: /home/developer
Starting as "user": /home/user