You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Tuesday, September 27th 2016, 6:47am

QDirIterator gives error no matching function [SOLVED]

Hi, Im new to QT and I've been studying getting all files from a directory. My codes gives a a no matching function for call and I can't understand what seems to be the problem. The snippet was from the internet. Thanks in advance.

Source code

QDir root = QDir::root();QStringList files;
QDirIterator ite(root, files << "*.txt", QDir::Files, QDirIterator::Subdirectories);
while (ite.hasNext()) {
qDebug() <<;
Nho02 has attached the following file:

This post has been edited 1 times, last edit by "Nho02" (Sep 27th 2016, 6:55am) with the following reason: root must be string.