QDir.entryList
-
Hi @jamat13, it would help if you can show us your code.
However, at a guess, I'd say you need to include
QDir::Dirs
too, because that directory (at least on my distro) contains only symlinks to directories. So I would tryQDir::AllDirs|QDir::AllEntries|QDir::System
to start with, and work back from there. If that doesn't work, show us the relevantQDir
code :)Edit: did a quick test. Here's some sample code, and the resulting output, at least for my host (Ubuntu 22.10):
const QDir dir(QStringLiteral("/sys/class/video4linux")); qDebug() << dir.entryList(); // (".", "..", "video0", "video1") qDebug() << dir.entryList(QDir::Files|QDir::System); // () qDebug() << dir.entryList(QDir::Dirs); // (".", "..", "video0", "video1") qDebug() << dir.entryList(QDir::Dirs|QDir::NoDotAndDotDot); // ("video0", "video1")
Cheers.