Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfscompleter_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFSCOMPLETOR_P_H
5#define QFSCOMPLETOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include "qcompleter.h"
20#include <QtGui/qfilesystemmodel.h>
21
22QT_REQUIRE_CONFIG(fscompleter);
23
25
29class Q_WIDGETS_EXPORT QFSCompleter : public QCompleter {
30public:
31 explicit QFSCompleter(QFileSystemModel *model, QObject *parent = nullptr)
32 : QCompleter(model, parent), proxyModel(nullptr), sourceModel(model)
33 {
34#if defined(Q_OS_WIN)
36#endif
37 }
38 QString pathFromIndex(const QModelIndex &index) const override;
39 QStringList splitPath(const QString& path) const override;
40
43};
44
46
47#endif // QFSCOMPLETOR_P_H
48
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
The QCompleter class provides completions based on an item model.
Definition qcompleter.h:24
QCompleter that can deal with QFileSystemModel.
QFSCompleter(QFileSystemModel *model, QObject *parent=nullptr)
QStringList splitPath(const QString &path) const override
Splits the given path into strings that are used to match at each level in the model().
QString pathFromIndex(const QModelIndex &index) const override
Returns the path for the given index.
QAbstractProxyModel * proxyModel
QFileSystemModel * sourceModel
The QFileSystemModel class provides a data model for the local filesystem.
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
@ CaseInsensitive
GLuint index
[2]
GLsizei const GLchar *const * path
#define QT_REQUIRE_CONFIG(feature)
QSqlQueryModel * model
[16]
QObject::connect nullptr
wordList<< "alpha"<< "omega"<< "omicron"<< "zeta";QLineEdit *lineEdit=new QLineEdit(this);QCompleter *completer=new QCompleter(wordList, this);completer-> setCaseSensitivity(Qt::CaseInsensitive)