Questions tagged [qstandardpaths]

The QStandardPaths class provides methods for accessing standard paths.

The QStandardPaths class provides methods for accessing standard paths.

This class contains functions to query standard locations on the local filesystem, for common tasks such as user-specific directories or system-wide configuration directories.

Reference: http://qt-project.org/doc/qt-5/qstandardpaths.html

8 questions
29
votes
4 answers

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-aadithyasb'

I am using WSL in Windows 10. I have this warning getting displayed when I run a python file: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-aadithyasb' I can understand that the XDG_RUNTIME_DIR environment variable is not set…
Aadithya Sathya
  • 797
  • 1
  • 6
  • 12
5
votes
1 answer

QDir::tempPath() vs QStandardPaths::writableLocation()

I need to get the path to the temporary directory. Is there any difference between the following methods (except for the first one is available in Qt 4)? Which one is better to…
John Doe
  • 555
  • 6
  • 17
1
vote
0 answers

QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000

I am wondering if the above message is critical for the program's stability? I got it when I ran my program, written in Qt Creator 7.0.1 with Qt 6.2.3, in a terminal (/usr/bin/x-terminal-emulator -e sudo) on Ubuntu 22.04. My Qt project's file is as…
Vladimir
  • 301
  • 3
  • 12
1
vote
1 answer

Error message when opening an application in WSL

I'm getting this error message when opening an application in Windows Subsystem for Linux from the terminal: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-adduser' qt.qpa.screen: QXcbConnection: Could not connect to…
Ada
  • 11
  • 1
1
vote
3 answers

Default write file to desktop

Is there a default code in c++ to write a file(.txt) to a desktop, which could be used for any computer without knowing the leading /desktop?
Tim
  • 11
  • 1
1
vote
2 answers

QT Creator Error (no match for operator =)

I'm receiving this error everytime I build my code. I'm using QT Creator 3.1, (5.2.1 build) error: no match for 'operator+' (operand types are 'QStringList' and 'const char [2]') Here is a snippet of code, hope it can help (the asterix line is…
0
votes
0 answers

WARNING: QStandardPaths: error creating runtime directory '/directory/path' (No such file or directory) WARNING: could not determine DPI

Is it possible to silence these errors? I am creating an application that displays a terminal and runs the napari software, and don't want these warnings to show. Is there any variable I can turn off or silence to prevent these messages from showing…
0
votes
1 answer

Qt How can I use DocumentsLocation

I am trying to develop an application with Qt. My problem is: I need to write and delete something in a text file. I am writing the text file as full path, the path on my computer. If the application runs on another computer, it will not find this…
ysncck
  • 117
  • 7