Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Constructing a std::filesystem::path from a QString
-
Hi all I'm trying to construct a std::filesystem::path from a QString
I wrote:
std::filesystem::path path(settings.value(keyName).toString().toStdU16String());
but I'm concerned that this may only work correctly on Windows.
What's the "correct" way to do this please?
Thanks
David
-
@Perdrix said in Constructing a std::filesystem::path from a QString:
but I'm concerned that this may only work correctly on Windows.
Why?
-
If there's no problem, then I am happy - it's just that I've been bitten before by stuff that felt like it ought to work but didn't!
David
-
@Perdrix said in Constructing a std::filesystem::path from a QString:
it's just that I've been bitten before by stuff that felt like it ought to work but didn't!
Still no clear answer :)
When the path is properly constructed I don't see what should go wrong here.