19 #include <QStringList> 35 QCompleter(model, parent) {
49 if (messageFieldItemModel)
50 messageFieldItemModel->
update(path);
52 return path.split(
"/");
56 QStringList fieldNames;
57 QModelIndex fieldIndex = index;
60 while (fieldIndex.isValid()) {
61 fieldNames.prepend(model()->data(fieldIndex, Qt::DisplayRole).
63 fieldIndex = fieldIndex.parent();
67 return fieldNames.join(
"/");
virtual ~MessageFieldCompleter()
QString pathFromIndex(const QModelIndex &index) const
MessageFieldCompleter(QObject *parent=0)
QStringList splitPath(const QString &path) const
void update(const QString &path)