Questions tagged [qdir]

A QDir is a class from the Qt toolkit which provides access to directory structures and their contents.

A QDir is used to manipulate path names, access information regarding paths and files, and manipulate the underlying file system. It can also be used to access Qt's resource system.

The official documentation can be found here for Qt 4.8 and here for Qt 5.

84 questions
0
votes
1 answer

QDir::rename() doesn't work

I'm running this code on windows 7 pro: foreach(QString str, directorie.entryList(QStringList(), QDir::Dirs)) { if(str != "." && str != "..") { QDir path(directorie.path() + "\\" + str + "\\" + from.path()); …
BlueMagma
  • 2,392
  • 1
  • 22
  • 46
0
votes
1 answer

Recursive search for directory returning incorrect value

Having a problem returning the correct value from a recursive search for a directory. The code is below #include #include #include #include static QString findDirectoryPathFromId(const QString…
mikip
  • 1,677
  • 6
  • 25
  • 35
0
votes
1 answer

QDir::SetSorting Doesn't work on Ubuntu

I have a problem with QDir, I have this folder with lots of images, and I need to iterate through them but, they have to be sorted, so, I'm using setSorting(QDir::Name) however, It doesn't work on Ubuntu. When I iterate it with QDirIterator it…
Malkavian
  • 372
  • 1
  • 5
  • 16
-1
votes
1 answer

How to identify whether an item is a file or a folder in QT

I wanted to specify from a path, whether the item is a file or a folder. How can I implement such function which takes a path (QString based input) and tells whether it is a file or folder?
night-wolf
  • 127
  • 9
-1
votes
1 answer

Does simplier way to use filters in EntryList() exist?

I am new in Qt. I have two types of files in my directory. First I need to work with one type and then with another. I decided to use EntryList() with name filters like ".png" and ".txt" and it works pretty well. But this method requiers filters…
kiborg51
  • 61
  • 5
-1
votes
2 answers

How to capture parent directory from lambda

In my code I list subdirectories name(only child dir) and if i click this subdirectory , the images inside this subdir will be displayed. In my case I cant capture parent directory from inside lambda. How can I do that? Dir directory =…
J.YOLO
  • 41
  • 6
-1
votes
1 answer

How to manipulate multiple Folders/Dir in QT?

I want to know how to manipulate directories until I get video files. Firstly the main Directory is "F:/TestingVideos/" Inside the test video there are files e.g:1. Cash Office ,2.Rosville Gate ,3. My Videos Each of this videos holds other folders…
-1
votes
1 answer

Cannot list device files in Ubuntu/Debian using QDir in Qt5

On Ubuntu/Debian platform I want to list all possible video sources using QDir in my Qt5 application by listing their device files under /dev. The code below works fine if I set myPath to a dummy folder in in my home folder full of text files named…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
-1
votes
3 answers

QT QDir::entryList not working in release

I have a strange problem. In QT my Application is working fine, but when i run the .exe file the Method QDir::entryList is not working... and I don't know why. The path and so is set. QDir pdir(cs.protocolDir); QString…
mreithuber
  • 3
  • 1
  • 5
1 2 3 4 5
6