The QFileInfoListModel class is a model for a list of QFileInfo
objects.
More...
#include <qfileinfolistmodel.h>
The QFileInfoListModel class is a model for a list of QFileInfo
objects.
References:
The implementations of the Qt library classes QStringListModel and QAbstractItemModel were also referenced during the creation of this model.
Warning: This class overrides only a few functions, just enough to make it work for its current usages. Before using it elsewhere, you may need to adapt it to your requirements.
◆ QFileInfoListModel()
QFileInfoListModel::QFileInfoListModel |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ ~QFileInfoListModel()
QFileInfoListModel::~QFileInfoListModel |
( |
| ) |
|
◆ columnCount()
int QFileInfoListModel::columnCount |
( |
const QModelIndex & | parent | ) |
const |
|
override |
◆ data()
QVariant QFileInfoListModel::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
◆ headerData()
QVariant QFileInfoListModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
◆ rowCount()
int QFileInfoListModel::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ setQFileInfoList()
void QFileInfoListModel::setQFileInfoList |
( |
const QList< QFileInfo > & | fileInfos | ) |
|
QFileInfoListModel::setQFileInfoList.
- Parameters
-
Sets the model's internal QFileInfo list to fileInfos
. The model will notify any attached views that its underlying data has changed.
The documentation for this class was generated from the following files: