64 int main(
int argc,
char **argv)
89 CustomFileEngine::beginEntryList(QDir::Filters
filters,
const QStringList &filterNames)
91 return new CustomFileEngineIterator(
filters, filterNames);
105 entries <<
"entry1" <<
"entry2" <<
"entry3";
110 return index < entries.size() - 1;
123 return entries.at(
index);
QString currentFileName() override
CustomIterator(const QStringList &nameFilters, QDir::Filters filters)
bool hasNext() const override
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
QDir::Filters filters() const
QStringList nameFilters() const
QString currentFilePath() const
The QApplication class manages the GUI application's control flow and main settings.
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
QAbstractFileEngine * create(const QString &fileName) const override
[0]
int main(int argc, char **argv)
[1]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
QApplication app(argc, argv)
[0]