[Interest] QDir("~").absoluteFilePath(".mozilla")

Andy asmaloney at gmail.com
Sat Nov 17 04:35:38 CET 2018


"~" is a shell variable (bash/sh/etc), so that won't work here.

What you probably want is QStandardPaths::HomeLocation.

https://doc.qt.io/qt-5/qstandardpaths.html

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Fri, Nov 16, 2018 at 10:27 PM Alexander Dyagilev <alervdvcw at gmail.com>
wrote:

> Hello,
>
> Linux. How?
>
> It gives me incorrect path of the expected one.
>
> I expect this:
>
> /home/user/.mozilla
>
> It returns me this:
>
>
> /home/user/Desktop/build-test-Desktop_Qt_5_11_2_GCC_64bit-Debug/bin/~/.mozilla
>
> P.S. I'm new to Linux so sorry for the probably stupid question.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20181116/10739472/attachment.html>


More information about the Interest mailing list