V
V
Vladislav Vladislav2020-06-10 22:45:02
Qt
Vladislav Vladislav, 2020-06-10 22:45:02

Why doesn't #include find the entryList function?

next are the main form classes
QApplication
QDir
QFile
include classes

Test code
QDir myDir("/home/some/location");
QStringList filesList = myDir.entryList("*"); error on this line


main.cpp:17:31: error: no matching member function for call to 'entryList'
qdir.h:157:17: note: candidate function not viable: no known conversion from 'const char [2]' to 'QDir::Filters' (aka 'QFlags') for 1st argument
qdir.h:158:17: note: candidate function not viable: no known conversion from 'const char [2]' to 'const QStringList' for 1st argument

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-06-10
@silik

Because you're passing parameters the wrong way: QDir::entryList(const QStringList &nameFilters, QD...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question