7#include <private/qquickindicatorbutton_p.h>
8#include <QtQuickTemplates2/private/qquicktextfield_p.h>
11#include <private/qqmldelegatemodel_p.h>
14#include <QtQml/qqmlcomponent.h>
15#include <QtQuick/private/qquickaccessibleattached_p.h>
16#if QT_CONFIG(quick_itemview)
17# include <QtQuick/private/qquickitemview_p.h>
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
132
133
134
135
136
137
138
139
140
141
145
146
147
148
149
150
151
152
153
156
157
158
159
160
161
162
163
164
165
166
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
186
187
188
189
190
191
192
195
196
197
198
199
200
203
204
205
206
207
208
218 Q_DECLARE_PUBLIC(QQuickSearchField)
263 static inline QString
popupName() {
return QStringLiteral(
"popup"); }
293 return popup && popup->isVisible();
301 if (popup && !popup->isVisible())
307 Q_Q(QQuickSearchField);
312 emit q->activated(highlightedIndex);
314 if (popup && popup->isVisible())
323 qCDebug(lcItemManagement) <<
"hiding old popup" << popup;
325 popup->setVisible(
false);
326 popup->setParentItem(
nullptr);
327#if QT_CONFIG(accessibility)
329 QQuickAccessibleAttached *accessible = accessibleAttached(popup);
331 accessible->setIgnored(
true);
337 if (isPopupVisible())
338 QGuiApplication::inputMethod()->reset();
340#if QT_CONFIG(quick_itemview)
341 QQuickItemView *itemView = popup->findChild<QQuickItemView *>();
343 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
348#if QT_CONFIG(quick_itemview)
350 itemView->positionViewAtIndex(highlightedIndex, QQuickItemView::Beginning);
356 Q_Q(QQuickSearchField);
358 emit q->popupChanged();
363 Q_Q(QQuickSearchField);
373 Q_Q(QQuickSearchField);
375 QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(q->sender());
376 if (!button || !button->isHovered() || !button->isEnabled()
377 || QQuickAbstractButtonPrivate::get(button)->touchId != -1)
384#if QT_CONFIG(quick_itemview)
385 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
386 itemView->positionViewAtIndex(index, QQuickItemView::Contain);
394 Q_Q(QQuickSearchField);
395 QQuickItem *item = qobject_cast<QQuickItem *>(object);
396 if (item && !item->parentItem()) {
398 item->setParentItem(popup->contentItem());
400 item->setParentItem(q);
401 QQuickItemPrivate::get(item)->setCulled(
true);
404 QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(object);
406 button->setFocusPolicy(Qt::NoFocus);
407 connect(button, &QQuickAbstractButton::clicked,
this,
409 connect(button, &QQuickAbstractButton::hoveredChanged,
this,
416 Q_Q(QQuickSearchField);
418 if (q->suggestionCount() == 0) {
421 emit q->suggestionCountChanged();
427 if (!text.isEmpty()) {
428 for (
int idx = 0; idx < q->suggestionCount(); ++idx) {
429 if (textAt(idx) == text) {
437 emit q->suggestionCountChanged();
442 Q_Q(QQuickSearchField);
443 if (isPopupVisible()) {
444 if (highlightedIndex < q->suggestionCount() - 1)
451 if (isPopupVisible()) {
459 Q_Q(QQuickSearchField);
464 emit q->currentIndexChanged();
469 Q_Q(QQuickSearchField);
474 emit q->currentIndexChanged();
479 emit q->activated(index);
484 Q_Q(QQuickSearchField);
487 if (isPopupVisible()) {
490 else if (q->suggestionCount() > 0)
499 Q_Q(QQuickSearchField);
504 emit q->highlightedIndexChanged();
507 emit q->highlighted(index);
512 Q_Q(QQuickSearchField);
517 const QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
521 const int pos = input->cursorPosition();
526 emit q->cursorPositionChanged();
531 Q_Q(QQuickSearchField);
536 disconnect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
538 disconnect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
543 delegateModel = suggestionModel.value<QQmlInstanceModel *>();
545 if (!delegateModel && suggestionModel.isValid()) {
546 QQmlDelegateModel *dataModel =
new QQmlDelegateModel(qmlContext(q), q);
547 dataModel->setModel(suggestionModel);
549 if (q->isComponentComplete())
550 dataModel->componentComplete();
557 connect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
559 connect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
563 emit q->delegateModelChanged();
571 return textRole.isEmpty() ? QStringLiteral(
"modelData") : textRole;
576 Q_Q(QQuickSearchField);
577 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
581 const QString textInput = input->text();
583 if (text != textInput) {
584 q->setText(textInput);
585 emit q->textEdited();
591 emit q->searchTriggered();
594 if (text.isEmpty()) {
595 if (isPopupVisible())
599 if (!isPopupVisible())
602 if (isPopupVisible())
610 Q_Q(QQuickSearchField);
614 const QString currentText = textAt(currentIndex);
615 if (text != currentText)
616 q->setText(currentText);
634 Q_Q(QQuickSearchField);
635 quickCancelDeferred(q, popupName());
640 Q_Q(QQuickSearchField);
641 if (popup.wasExecuted())
644 if (!popup || complete)
645 quickBeginDeferred(q, popupName(), popup);
647 quickCompleteDeferred(q, popupName(), popup);
652 Q_Q(QQuickSearchField);
653 QQuickControlPrivate::handlePress(point, timestamp);
657 const bool isSearch = si && si->isEnabled() && si->contains(q->mapToItem(si, point));
658 const bool isClear = ci && ci->isEnabled() && ci->contains(q->mapToItem(ci, point));
663 }
else if (isClear) {
673 QQuickControlPrivate::handleRelease(point, timestamp);
683 Q_Q(QQuickSearchField);
685 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
689 input->forceActiveFocus();
690 emit q->searchButtonPressed();
695 Q_Q(QQuickSearchField);
701 if (!text.isEmpty()) {
704 q->setText(QString());
706 if (isPopupVisible())
709 emit q->clearButtonPressed();
715 QQuickControlPrivate::itemImplicitWidthChanged(item);
717 emit searchIndicator->implicitIndicatorWidthChanged();
719 emit clearIndicator->implicitIndicatorWidthChanged();
724 QQuickControlPrivate::itemImplicitHeightChanged(item);
726 emit searchIndicator->implicitIndicatorHeightChanged();
728 emit clearIndicator->implicitIndicatorHeightChanged();
733 QQuickControlPrivate::itemDestroyed(item);
740QQuickSearchField::QQuickSearchField(QQuickItem *parent)
741 : QQuickControl(*(
new QQuickSearchFieldPrivate), parent)
743 Q_D(QQuickSearchField);
744 d->searchIndicator =
new QQuickIndicatorButton(
this);
745 d->clearIndicator =
new QQuickIndicatorButton(
this);
747 setFocusPolicy(Qt::StrongFocus);
748 setFlag(QQuickItem::ItemIsFocusScope);
749 setAcceptedMouseButtons(Qt::LeftButton);
751 setCursor(Qt::ArrowCursor);
757QQuickSearchField::~QQuickSearchField()
759 Q_D(QQuickSearchField);
760 d->removeImplicitSizeListener(d->searchIndicator->indicator());
761 d->removeImplicitSizeListener(d->clearIndicator->indicator());
764 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
765 &QQuickSearchFieldPrivate::popupVisibleChanged);
766 d->hideOldPopup(d->popup);
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
790QVariant QQuickSearchField::suggestionModel()
const
792 Q_D(
const QQuickSearchField);
793 return d->suggestionModel;
796void QQuickSearchField::setSuggestionModel(
const QVariant &model)
798 Q_D(QQuickSearchField);
800 QVariant suggestionModel;
801 if (QJSValue *value = get_if<QJSValue>(&suggestionModel))
802 suggestionModel = value->toVariant();
804 suggestionModel = model;
806 if (d->suggestionModel == suggestionModel)
809 d->suggestionModel = suggestionModel;
810 d->createDelegateModel();
811 emit suggestionCountChanged();
812 emit suggestionModelChanged();
816
817
818
819
820
821
822
823
824
825QQmlInstanceModel *QQuickSearchField::delegateModel()
const
827 Q_D(
const QQuickSearchField);
828 return d->delegateModel;
832
833
834
835
836
837int QQuickSearchField::suggestionCount()
const
839 Q_D(
const QQuickSearchField);
840 return d->delegateModel ? d->delegateModel->count() : 0;
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861int QQuickSearchField::currentIndex()
const
863 Q_D(
const QQuickSearchField);
864 return d->currentIndex;
867void QQuickSearchField::setCurrentIndex(
int index)
869 Q_D(QQuickSearchField);
870 d->hasCurrentIndex =
true;
871 d->setCurrentIndex(index);
875
876
877
878
879
880
881
882
883
884
885
886
887int QQuickSearchField::highlightedIndex()
const
889 Q_D(
const QQuickSearchField);
890 return d->highlightedIndex;
894
895
896
897
898
899
900
901
902QString QQuickSearchField::text()
const
904 Q_D(
const QQuickSearchField);
908void QQuickSearchField::setText(
const QString &text)
910 Q_D(QQuickSearchField);
919
920
921
922
923
924
925
926
927QString QQuickSearchField::textRole()
const
929 Q_D(
const QQuickSearchField);
933void QQuickSearchField::setTextRole(
const QString &textRole)
935 Q_D(QQuickSearchField);
936 if (d->textRole == textRole)
939 d->textRole = textRole;
943
944
945
946
947
948
949
950
951
952
953
954
956bool QQuickSearchField::isLive()
const
958 Q_D(
const QQuickSearchField);
962void QQuickSearchField::setLive(
const bool live)
964 Q_D(QQuickSearchField);
973
974
975
976
977
978
979
980
981
982
983
984
985QQuickIndicatorButton *QQuickSearchField::searchIndicator()
const
987 Q_D(
const QQuickSearchField);
988 return d->searchIndicator;
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004QQuickIndicatorButton *QQuickSearchField::clearIndicator()
const
1006 Q_D(
const QQuickSearchField);
1007 return d->clearIndicator;
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022QQuickPopup *QQuickSearchField::popup()
const
1024 QQuickSearchFieldPrivate *d =
const_cast<QQuickSearchFieldPrivate *>(d_func());
1026 d->executePopup(isComponentComplete());
1030void QQuickSearchField::setPopup(QQuickPopup *popup)
1032 Q_D(QQuickSearchField);
1033 if (d->popup == popup)
1036 if (!d->popup.isExecuting())
1040 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::destroyed, d,
1041 &QQuickSearchFieldPrivate::popupDestroyed);
1042 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
1043 &QQuickSearchFieldPrivate::popupVisibleChanged);
1044 QQuickSearchFieldPrivate::hideOldPopup(d->popup);
1048#if QT_CONFIG(wayland)
1049 QQuickPopupPrivate::get(popup)->extendedWindowType = QNativeInterface::Private::QWaylandWindow::ComboBox;
1051 QQuickPopupPrivate::get(popup)->allowVerticalFlip =
true;
1052 popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
1053 QObjectPrivate::connect(popup, &QQuickPopup::visibleChanged, d,
1054 &QQuickSearchFieldPrivate::popupVisibleChanged);
1057 QObjectPrivate::connect(popup, &QQuickPopup::destroyed, d,
1058 &QQuickSearchFieldPrivate::popupDestroyed);
1060#if QT_CONFIG(quick_itemview)
1061 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
1062 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
1067 if (!d->popup.isExecuting())
1068 emit popupChanged();
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094QQmlComponent *QQuickSearchField::delegate()
const
1096 Q_D(
const QQuickSearchField);
1100void QQuickSearchField::setDelegate(QQmlComponent *delegate)
1102 Q_D(QQuickSearchField);
1103 if (d->delegate == delegate)
1106 d->delegate = delegate;
1107 QQmlDelegateModel *delegateModel = qobject_cast<QQmlDelegateModel *>(d->delegateModel);
1109 delegateModel->setDelegate(d->delegate);
1110 emit delegateChanged();
1114
1115
1116
1117
1118
1119
1120QString QQuickSearchField::placeholderText()
const
1122 Q_D(
const QQuickSearchField);
1123 return d->placeholderText;
1126void QQuickSearchField::setPlaceholderText(
const QString &text)
1128 Q_D(QQuickSearchField);
1129 if (d->placeholderText == text)
1132 d->placeholderText = text;
1133 emit placeholderTextChanged();
1137
1138
1139
1140
1141
1142
1143
1144bool QQuickSearchField::selectTextByMouse()
const
1146 Q_D(
const QQuickSearchField);
1147 return d->selectTextByMouse;
1150void QQuickSearchField::setSelectTextByMouse(
const bool selectable)
1152 Q_D(QQuickSearchField);
1153 if (d->selectTextByMouse == selectable)
1156 d->selectTextByMouse = selectable;
1157 emit selectTextByMouseChanged();
1161
1162
1163
1164
1165
1166
1167QString QQuickSearchField::selectedText()
const
1169 Q_D(
const QQuickSearchField);
1170 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1173 return input->selectedText();
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188int QQuickSearchField::selectionStart()
const
1190 Q_D(
const QQuickSearchField);
1191 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1194 return input->selectionStart();
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209int QQuickSearchField::selectionEnd()
const
1211 Q_D(
const QQuickSearchField);
1212 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1215 return input->selectionEnd();
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232int QQuickSearchField::cursorPosition()
const
1234 Q_D(
const QQuickSearchField);
1235 return d->cursorPosition;
1238void QQuickSearchField::setCursorPosition(
int position)
1240 Q_D(QQuickSearchField);
1241 if (d->cursorPosition == position)
1244 d->cursorPosition = position;
1246 if (QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem)) {
1247 if (input->cursorPosition() != position)
1248 input->setCursorPosition(position);
1251 emit cursorPositionChanged();
1255
1256
1257
1258
1259
1260void QQuickSearchField::selectAll()
1262 Q_D(QQuickSearchField);
1263 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283void QQuickSearchField::select(
int start,
int end)
1285 Q_D(QQuickSearchField);
1286 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1289 input->select(start, end);
1293
1294
1295
1296
1297
1298
1299
1300void QQuickSearchField::selectWord()
1302 Q_D(QQuickSearchField);
1303 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1306 input->selectWord();
1310
1311
1312
1313
1314
1315
1316
1317void QQuickSearchField::deselect()
1319 Q_D(QQuickSearchField);
1320 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1326bool QQuickSearchField::eventFilter(QObject *object, QEvent *event)
1328 Q_D(QQuickSearchField);
1330 switch (event->type()) {
1331 case QEvent::MouseButtonRelease: {
1332 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1333 if (input->hasFocus() && !d->text.isEmpty() && !d->isPopupVisible()
1334 && (d->delegateModel && d->delegateModel->count() > 0)
1335 &&
static_cast<QMouseEvent*>(event)->button() == Qt::LeftButton) {
1340 case QEvent::FocusOut: {
1341 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1342 const bool usingPopupWindows =
1343 d->popup ? QQuickPopupPrivate::get(d->popup)->usePopupWindow() :
false;
1344 if (qGuiApp->focusObject() !=
this && !(hasActiveFocus && !usingPopupWindows))
1345 d->hidePopup(
false);
1352 return QQuickControl::eventFilter(object, event);
1355void QQuickSearchField::focusInEvent(QFocusEvent *event)
1357 Q_D(QQuickSearchField);
1358 QQuickControl::focusInEvent(event);
1360 if (!d->contentItem)
1363 const auto reason = event->reason();
1365 case Qt::TabFocusReason:
1366 case Qt::BacktabFocusReason:
1367 case Qt::ShortcutFocusReason:
1368 case Qt::OtherFocusReason:
1369 if (reason != Qt::OtherFocusReason || !d->isPopupVisible())
1370 d->contentItem->forceActiveFocus(reason);
1377void QQuickSearchField::focusOutEvent(QFocusEvent *event)
1379 Q_D(QQuickSearchField);
1380 QQuickControl::focusOutEvent(event);
1382 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1383 const bool usingPopupWindows = d->popup && QQuickPopupPrivate::get(d->popup)->usePopupWindow();
1385 if (qGuiApp->focusObject() != d->contentItem && !(hasActiveFocus && !usingPopupWindows))
1386 d->hidePopup(
false);
1389void QQuickSearchField::hoverEnterEvent(QHoverEvent *event)
1391 Q_D(QQuickSearchField);
1392 QQuickControl::hoverEnterEvent(event);
1393 QQuickItem *si = d->searchIndicator->indicator();
1394 QQuickItem *ci = d->clearIndicator->indicator();
1395 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1396 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1400void QQuickSearchField::hoverMoveEvent(QHoverEvent *event)
1402 Q_D(QQuickSearchField);
1403 QQuickControl::hoverMoveEvent(event);
1404 QQuickItem *si = d->searchIndicator->indicator();
1405 QQuickItem *ci = d->clearIndicator->indicator();
1406 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1407 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1411void QQuickSearchField::hoverLeaveEvent(QHoverEvent *event)
1413 Q_D(QQuickSearchField);
1414 QQuickControl::hoverLeaveEvent(event);
1415 d->searchIndicator->setHovered(
false);
1416 d->clearIndicator->setHovered(
false);
1420void QQuickSearchField::keyPressEvent(QKeyEvent *event)
1422 Q_D(QQuickSearchField);
1424 const auto key = event->key();
1425 const bool hasModel = !d->suggestionModel.isNull();
1426 const bool hasText = !d->text.isEmpty();
1429 case Qt::Key_Escape:
1431 if (d->isPopupVisible()) {
1432 d->hidePopup(
false);
1434 }
else if (hasText) {
1439 case Qt::Key_Return:
1441 if (d->isPopupVisible())
1444 emit searchTriggered();
1448 if (hasModel && hasText) {
1449 d->decreaseCurrentIndex();
1454 if (hasModel && hasText) {
1455 d->increaseCurrentIndex();
1460 if (d->isPopupVisible()) {
1461 d->setHighlightedIndex(0, Highlight);
1466 if (d->isPopupVisible()) {
1467 d->setHighlightedIndex(suggestionCount() - 1, Highlight);
1472 QQuickControl::keyPressEvent(event);
1477void QQuickSearchField::classBegin()
1479 Q_D(QQuickSearchField);
1480 QQuickControl::classBegin();
1482 QQmlContext *context = qmlContext(
this);
1484 QQmlEngine::setContextForObject(d->searchIndicator, context);
1485 QQmlEngine::setContextForObject(d->clearIndicator, context);
1489void QQuickSearchField::componentComplete()
1491 Q_D(QQuickSearchField);
1492 QQuickIndicatorButtonPrivate::get(d->searchIndicator)->executeIndicator(
true);
1493 QQuickIndicatorButtonPrivate::get(d->clearIndicator)->executeIndicator(
true);
1494 QQuickControl::componentComplete();
1497 d->executePopup(
true);
1499 if (d->delegateModel && d->ownModel)
1500 static_cast<QQmlDelegateModel *>(d->delegateModel)->componentComplete();
1503void QQuickSearchField::contentItemChange(QQuickItem *newItem, QQuickItem *oldItem)
1505 Q_D(QQuickSearchField);
1507 oldItem->removeEventFilter(
this);
1508 if (QQuickTextInput *oldInput = qobject_cast<QQuickTextInput *>(oldItem)) {
1509 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::textChanged, d,
1510 &QQuickSearchFieldPrivate::updateText);
1511 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::cursorPositionChanged,
1512 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1517 newItem->installEventFilter(
this);
1518 if (QQuickTextInput *newInput = qobject_cast<QQuickTextInput *>(newItem)) {
1519 QObjectPrivate::connect(newInput, &QQuickTextInput::textChanged, d,
1520 &QQuickSearchFieldPrivate::updateText);
1521 QObjectPrivate::connect(newInput, &QQuickTextInput::cursorPositionChanged,
1522 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1524 #if QT_CONFIG(cursor)
1525 newItem->setCursor(Qt::IBeamCursor);
1530void QQuickSearchField::itemChange(ItemChange change,
const ItemChangeData &data)
1532 Q_D(QQuickSearchField);
1533 QQuickControl::itemChange(change, data);
1534 if (change == ItemVisibleHasChanged && !data.boolValue) {
1535 d->hidePopup(
false);
1536 d->setCurrentItemAtIndex(-1, NoActivate);
1542#include "moc_qquicksearchfield_p.cpp"
void createdItem(int index, QObject *object)
QQuickIndicatorButton * clearIndicator
bool handleRelease(const QPointF &point, ulong timestamp) override
void suggestionCountChanged()
void decreaseCurrentIndex()
void setCurrentIndex(int index)
void itemDestroyed(QQuickItem *item) override
void hidePopup(bool accept)
bool isValidIndex(int index) const
static void hideOldPopup(QQuickPopup *popup)
QQuickDeferredPointer< QQuickPopup > popup
void itemImplicitWidthChanged(QQuickItem *item) override
void itemImplicitHeightChanged(QQuickItem *item) override
void popupVisibleChanged()
static QString popupName()
void setCurrentItemAtIndex(int index, Activation activate)
bool handlePress(const QPointF &point, ulong timestamp) override
void increaseCurrentIndex()
void createDelegateModel()
void setHighlightedIndex(int index, Highlighting highlight)
QString currentTextRole() const
QString textAt(int index) const
void executePopup(bool complete=false)
void updateCursorPosition()
QQmlInstanceModel * delegateModel
QQuickIndicatorButton * searchIndicator
void updateHighlightedIndex()
Combined button and popup list for selecting options.