Unsolved QFileDialog to select a file returns Permission denied
-
Hi,
I need a file dialog to open get the path to a binary.
I've tried:PathSet(QFileDialog::getOpenFileName(parent, nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
which seems to work only that it prints QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied to stdout when it opens up plus the dialog is unresponsive for a few ~3(?) and the files in /usr/bin/ seem to have finished loadinng - before I actually can interact with the dialog and choose a file. How do I
- get rid of the permission error
- make the dialog more responsive? There's nothing else n the function that could/would block it nor is there anything else in my application going on in the background. It's just waiting for this file...:
void ScaperDialog::ChooseBin(void) { PathSet(QFileDialog::getOpenFileName(parent, nme_get()+" binary", "/usr/bin", "All Files (*.*)")); }
-
@cerr On which platform does this happen?
-
-
@jsulm said in QFileDialog to select a file returns Permission denied:
@cerr On which platform does this happen?
Linux , kernel 4.4.0-159,
And further to @jsulm, under whatever user you run your Qt app as, what does ls /usr/bin, or even ls -lR /usr/bin give --- any Permission denied?
my "regular" user account, and no, ld /usr/bin & /ls -lR /usr/bin both list the contents just fine
$ groups ron sudo dip netdev vboxusers wireshark docker
-
@cerr
The root of whatever the problem is lies in the
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied
see whether either of
- https://toggen.com.au/blog/it-tips/cause-of-qcad-qinotifyfilesystemwatcherengineaddpaths-inotify_add_watch-failed-permission-denied
- https://forum.libreelec.tv/thread/1805-fail-on-read-only-fs-without-useful-notice/
help you/give you any hints. Otherwise I think you'll have to read up on however "Linux inotify user permissions" work....