If we are talking about the Qt way ^^, why not do:

<pre>
    QString name("BitcoinQt");
    QString ddir(QString::fromStdString(GetDataDir(true).string()));
    name.append(QString::number(qHash(ddir)));
</pre>