|
Cute Chess
0.1
|
A model-based validator for strings. More...
#include <stringvalidator.h>
Public Member Functions | |
| void | setModel (const QAbstractItemModel *model) |
| void | setStartIndex (const QModelIndex &index) |
| StringValidator (QObject *parent=nullptr) | |
| virtual State | validate (QString &input, int &pos) const |
Additional Inherited Members | |
Public Types inherited from QValidator | |
| enum | State |
A model-based validator for strings.
The StringValidator class validates strings by searching for a case-insensitive partial or exact match in a QAbstractItemModel.
|
explicit |
Creates a new StringValidator object.
| void StringValidator::setModel | ( | const QAbstractItemModel * | model | ) |
Uses model as the validation model.
| void StringValidator::setStartIndex | ( | const QModelIndex & | index | ) |
Sets the index where the lookup starts to index.
By default model->index(0, 0) is used.
1.8.11