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
131
132
133
134
135
136
137
138
139
140
144
145
146
147
148
149
150
151
152
155
156
157
158
159
160
161
162
163
164
165
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
185
186
187
188
189
190
191
194
195
196
197
198
199
202
203
204
205
206
207
217 Q_DECLARE_PUBLIC(QQuickSearchField)
262 static inline QString
popupName() {
return QStringLiteral(
"popup"); }
292 return popup && popup->isVisible();
300 if (popup && !popup->isVisible())
306 Q_Q(QQuickSearchField);
311 emit q->activated(highlightedIndex);
313 if (popup && popup->isVisible())
322 qCDebug(lcItemManagement) <<
"hiding old popup" << popup;
324 popup->setVisible(
false);
325 popup->setParentItem(
nullptr);
326#if QT_CONFIG(accessibility)
328 QQuickAccessibleAttached *accessible = accessibleAttached(popup);
330 accessible->setIgnored(
true);
336 if (isPopupVisible())
337 QGuiApplication::inputMethod()->reset();
339#if QT_CONFIG(quick_itemview)
340 QQuickItemView *itemView = popup->findChild<QQuickItemView *>();
342 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
347#if QT_CONFIG(quick_itemview)
349 itemView->positionViewAtIndex(highlightedIndex, QQuickItemView::Beginning);
355 Q_Q(QQuickSearchField);
357 emit q->popupChanged();
362 Q_Q(QQuickSearchField);
372 Q_Q(QQuickSearchField);
374 QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(q->sender());
375 if (!button || !button->isHovered() || !button->isEnabled()
376 || QQuickAbstractButtonPrivate::get(button)->touchId != -1)
383#if QT_CONFIG(quick_itemview)
384 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
385 itemView->positionViewAtIndex(index, QQuickItemView::Contain);
393 Q_Q(QQuickSearchField);
394 QQuickItem *item = qobject_cast<QQuickItem *>(object);
395 if (item && !item->parentItem()) {
397 item->setParentItem(popup->contentItem());
399 item->setParentItem(q);
400 QQuickItemPrivate::get(item)->setCulled(
true);
403 QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton *>(object);
405 button->setFocusPolicy(Qt::NoFocus);
406 connect(button, &QQuickAbstractButton::clicked,
this,
408 connect(button, &QQuickAbstractButton::hoveredChanged,
this,
415 Q_Q(QQuickSearchField);
417 if (q->suggestionCount() == 0) {
420 emit q->suggestionCountChanged();
426 if (!text.isEmpty()) {
427 for (
int idx = 0; idx < q->suggestionCount(); ++idx) {
428 if (textAt(idx) == text) {
436 emit q->suggestionCountChanged();
441 Q_Q(QQuickSearchField);
442 if (isPopupVisible()) {
443 if (highlightedIndex < q->suggestionCount() - 1)
450 if (isPopupVisible()) {
458 Q_Q(QQuickSearchField);
463 emit q->currentIndexChanged();
468 Q_Q(QQuickSearchField);
473 emit q->currentIndexChanged();
478 emit q->activated(index);
483 Q_Q(QQuickSearchField);
486 if (isPopupVisible()) {
489 else if (q->suggestionCount() > 0)
498 Q_Q(QQuickSearchField);
503 emit q->highlightedIndexChanged();
506 emit q->highlighted(index);
511 Q_Q(QQuickSearchField);
516 const QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
520 const int pos = input->cursorPosition();
525 emit q->cursorPositionChanged();
530 Q_Q(QQuickSearchField);
535 disconnect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
537 disconnect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
542 delegateModel = suggestionModel.value<QQmlInstanceModel *>();
544 if (!delegateModel && suggestionModel.isValid()) {
545 QQmlDelegateModel *dataModel =
new QQmlDelegateModel(qmlContext(q), q);
546 dataModel->setModel(suggestionModel);
548 if (q->isComponentComplete())
549 dataModel->componentComplete();
556 connect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
558 connect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
562 emit q->delegateModelChanged();
570 return textRole.isEmpty() ? QStringLiteral(
"modelData") : textRole;
575 Q_Q(QQuickSearchField);
576 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
580 const QString textInput = input->text();
582 if (text != textInput) {
583 q->setText(textInput);
584 emit q->textEdited();
590 emit q->searchTriggered();
593 if (text.isEmpty()) {
594 if (isPopupVisible())
598 if (!isPopupVisible())
601 if (isPopupVisible())
609 Q_Q(QQuickSearchField);
613 const QString currentText = textAt(currentIndex);
614 if (text != currentText)
615 q->setText(currentText);
633 Q_Q(QQuickSearchField);
634 quickCancelDeferred(q, popupName());
639 Q_Q(QQuickSearchField);
640 if (popup.wasExecuted())
643 if (!popup || complete)
644 quickBeginDeferred(q, popupName(), popup);
646 quickCompleteDeferred(q, popupName(), popup);
651 Q_Q(QQuickSearchField);
652 QQuickControlPrivate::handlePress(point, timestamp);
656 const bool isSearch = si && si->isEnabled() && si->contains(q->mapToItem(si, point));
657 const bool isClear = ci && ci->isEnabled() && ci->contains(q->mapToItem(ci, point));
662 }
else if (isClear) {
672 QQuickControlPrivate::handleRelease(point, timestamp);
682 Q_Q(QQuickSearchField);
684 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
688 input->forceActiveFocus();
689 emit q->searchButtonPressed();
694 Q_Q(QQuickSearchField);
700 if (!text.isEmpty()) {
703 q->setText(QString());
705 if (isPopupVisible())
708 emit q->clearButtonPressed();
714 QQuickControlPrivate::itemImplicitWidthChanged(item);
716 emit searchIndicator->implicitIndicatorWidthChanged();
718 emit clearIndicator->implicitIndicatorWidthChanged();
723 QQuickControlPrivate::itemImplicitHeightChanged(item);
725 emit searchIndicator->implicitIndicatorHeightChanged();
727 emit clearIndicator->implicitIndicatorHeightChanged();
732 QQuickControlPrivate::itemDestroyed(item);
739QQuickSearchField::QQuickSearchField(QQuickItem *parent)
740 : QQuickControl(*(
new QQuickSearchFieldPrivate), parent)
742 Q_D(QQuickSearchField);
743 d->searchIndicator =
new QQuickIndicatorButton(
this);
744 d->clearIndicator =
new QQuickIndicatorButton(
this);
746 setFocusPolicy(Qt::StrongFocus);
747 setFlag(QQuickItem::ItemIsFocusScope);
748 setAcceptedMouseButtons(Qt::LeftButton);
750 setCursor(Qt::ArrowCursor);
756QQuickSearchField::~QQuickSearchField()
758 Q_D(QQuickSearchField);
759 d->removeImplicitSizeListener(d->searchIndicator->indicator());
760 d->removeImplicitSizeListener(d->clearIndicator->indicator());
763 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
764 &QQuickSearchFieldPrivate::popupVisibleChanged);
765 d->hideOldPopup(d->popup);
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
789QVariant QQuickSearchField::suggestionModel()
const
791 Q_D(
const QQuickSearchField);
792 return d->suggestionModel;
795void QQuickSearchField::setSuggestionModel(
const QVariant &model)
797 Q_D(QQuickSearchField);
799 QVariant suggestionModel;
800 if (QJSValue *value = get_if<QJSValue>(&suggestionModel))
801 suggestionModel = value->toVariant();
803 suggestionModel = model;
805 if (d->suggestionModel == suggestionModel)
808 d->suggestionModel = suggestionModel;
809 d->createDelegateModel();
810 emit suggestionCountChanged();
811 emit suggestionModelChanged();
815
816
817
818
819
820
821
822
823
824QQmlInstanceModel *QQuickSearchField::delegateModel()
const
826 Q_D(
const QQuickSearchField);
827 return d->delegateModel;
831
832
833
834
835
836int QQuickSearchField::suggestionCount()
const
838 Q_D(
const QQuickSearchField);
839 return d->delegateModel ? d->delegateModel->count() : 0;
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860int QQuickSearchField::currentIndex()
const
862 Q_D(
const QQuickSearchField);
863 return d->currentIndex;
866void QQuickSearchField::setCurrentIndex(
int index)
868 Q_D(QQuickSearchField);
869 d->hasCurrentIndex =
true;
870 d->setCurrentIndex(index);
874
875
876
877
878
879
880
881
882
883
884
885
886int QQuickSearchField::highlightedIndex()
const
888 Q_D(
const QQuickSearchField);
889 return d->highlightedIndex;
893
894
895
896
897
898
899
900
901QString QQuickSearchField::text()
const
903 Q_D(
const QQuickSearchField);
907void QQuickSearchField::setText(
const QString &text)
909 Q_D(QQuickSearchField);
918
919
920
921
922
923
924
925
926QString QQuickSearchField::textRole()
const
928 Q_D(
const QQuickSearchField);
932void QQuickSearchField::setTextRole(
const QString &textRole)
934 Q_D(QQuickSearchField);
935 if (d->textRole == textRole)
938 d->textRole = textRole;
942
943
944
945
946
947
948
949
950
951
952
953
955bool QQuickSearchField::isLive()
const
957 Q_D(
const QQuickSearchField);
961void QQuickSearchField::setLive(
const bool live)
963 Q_D(QQuickSearchField);
972
973
974
975
976
977
978
979
980
981
982
983
984QQuickIndicatorButton *QQuickSearchField::searchIndicator()
const
986 Q_D(
const QQuickSearchField);
987 return d->searchIndicator;
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003QQuickIndicatorButton *QQuickSearchField::clearIndicator()
const
1005 Q_D(
const QQuickSearchField);
1006 return d->clearIndicator;
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021QQuickPopup *QQuickSearchField::popup()
const
1023 QQuickSearchFieldPrivate *d =
const_cast<QQuickSearchFieldPrivate *>(d_func());
1025 d->executePopup(isComponentComplete());
1029void QQuickSearchField::setPopup(QQuickPopup *popup)
1031 Q_D(QQuickSearchField);
1032 if (d->popup == popup)
1035 if (!d->popup.isExecuting())
1039 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::destroyed, d,
1040 &QQuickSearchFieldPrivate::popupDestroyed);
1041 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
1042 &QQuickSearchFieldPrivate::popupVisibleChanged);
1043 QQuickSearchFieldPrivate::hideOldPopup(d->popup);
1047#if QT_CONFIG(wayland)
1048 QQuickPopupPrivate::get(popup)->extendedWindowType = QNativeInterface::Private::QWaylandWindow::ComboBox;
1050 QQuickPopupPrivate::get(popup)->allowVerticalFlip =
true;
1051 popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
1052 QObjectPrivate::connect(popup, &QQuickPopup::visibleChanged, d,
1053 &QQuickSearchFieldPrivate::popupVisibleChanged);
1056 QObjectPrivate::connect(popup, &QQuickPopup::destroyed, d,
1057 &QQuickSearchFieldPrivate::popupDestroyed);
1059#if QT_CONFIG(quick_itemview)
1060 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
1061 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
1066 if (!d->popup.isExecuting())
1067 emit popupChanged();
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093QQmlComponent *QQuickSearchField::delegate()
const
1095 Q_D(
const QQuickSearchField);
1099void QQuickSearchField::setDelegate(QQmlComponent *delegate)
1101 Q_D(QQuickSearchField);
1102 if (d->delegate == delegate)
1105 d->delegate = delegate;
1106 QQmlDelegateModel *delegateModel = qobject_cast<QQmlDelegateModel *>(d->delegateModel);
1108 delegateModel->setDelegate(d->delegate);
1109 emit delegateChanged();
1113
1114
1115
1116
1117
1118
1119QString QQuickSearchField::placeholderText()
const
1121 Q_D(
const QQuickSearchField);
1122 return d->placeholderText;
1125void QQuickSearchField::setPlaceholderText(
const QString &text)
1127 Q_D(QQuickSearchField);
1128 if (d->placeholderText == text)
1131 d->placeholderText = text;
1132 emit placeholderTextChanged();
1136
1137
1138
1139
1140
1141
1142
1143bool QQuickSearchField::selectTextByMouse()
const
1145 Q_D(
const QQuickSearchField);
1146 return d->selectTextByMouse;
1149void QQuickSearchField::setSelectTextByMouse(
const bool selectable)
1151 Q_D(QQuickSearchField);
1152 if (d->selectTextByMouse == selectable)
1155 d->selectTextByMouse = selectable;
1156 emit selectTextByMouseChanged();
1160
1161
1162
1163
1164
1165
1166QString QQuickSearchField::selectedText()
const
1168 Q_D(
const QQuickSearchField);
1169 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1172 return input->selectedText();
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187int QQuickSearchField::selectionStart()
const
1189 Q_D(
const QQuickSearchField);
1190 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1193 return input->selectionStart();
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208int QQuickSearchField::selectionEnd()
const
1210 Q_D(
const QQuickSearchField);
1211 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1214 return input->selectionEnd();
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231int QQuickSearchField::cursorPosition()
const
1233 Q_D(
const QQuickSearchField);
1234 return d->cursorPosition;
1237void QQuickSearchField::setCursorPosition(
int position)
1239 Q_D(QQuickSearchField);
1240 if (d->cursorPosition == position)
1243 d->cursorPosition = position;
1245 if (QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem)) {
1246 if (input->cursorPosition() != position)
1247 input->setCursorPosition(position);
1250 emit cursorPositionChanged();
1254
1255
1256
1257
1258
1259void QQuickSearchField::selectAll()
1261 Q_D(QQuickSearchField);
1262 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282void QQuickSearchField::select(
int start,
int end)
1284 Q_D(QQuickSearchField);
1285 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1288 input->select(start, end);
1292
1293
1294
1295
1296
1297
1298
1299void QQuickSearchField::selectWord()
1301 Q_D(QQuickSearchField);
1302 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1305 input->selectWord();
1309
1310
1311
1312
1313
1314
1315
1316void QQuickSearchField::deselect()
1318 Q_D(QQuickSearchField);
1319 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1325bool QQuickSearchField::eventFilter(QObject *object, QEvent *event)
1327 Q_D(QQuickSearchField);
1329 switch (event->type()) {
1330 case QEvent::MouseButtonRelease: {
1331 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1332 if (input->hasFocus() && !d->text.isEmpty() && !d->isPopupVisible()
1333 && (d->delegateModel && d->delegateModel->count() > 0)
1334 &&
static_cast<QMouseEvent*>(event)->button() == Qt::LeftButton) {
1339 case QEvent::FocusOut: {
1340 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1341 const bool usingPopupWindows =
1342 d->popup ? QQuickPopupPrivate::get(d->popup)->usePopupWindow() :
false;
1343 if (qGuiApp->focusObject() !=
this && !(hasActiveFocus && !usingPopupWindows))
1344 d->hidePopup(
false);
1351 return QQuickControl::eventFilter(object, event);
1354void QQuickSearchField::focusInEvent(QFocusEvent *event)
1356 Q_D(QQuickSearchField);
1357 QQuickControl::focusInEvent(event);
1359 if (!d->contentItem)
1362 const auto reason = event->reason();
1364 case Qt::TabFocusReason:
1365 case Qt::BacktabFocusReason:
1366 case Qt::ShortcutFocusReason:
1367 case Qt::OtherFocusReason:
1368 if (reason != Qt::OtherFocusReason || !d->isPopupVisible())
1369 d->contentItem->forceActiveFocus(reason);
1376void QQuickSearchField::focusOutEvent(QFocusEvent *event)
1378 Q_D(QQuickSearchField);
1379 QQuickControl::focusOutEvent(event);
1381 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1382 const bool usingPopupWindows = d->popup && QQuickPopupPrivate::get(d->popup)->usePopupWindow();
1384 if (qGuiApp->focusObject() != d->contentItem && !(hasActiveFocus && !usingPopupWindows))
1385 d->hidePopup(
false);
1388void QQuickSearchField::hoverEnterEvent(QHoverEvent *event)
1390 Q_D(QQuickSearchField);
1391 QQuickControl::hoverEnterEvent(event);
1392 QQuickItem *si = d->searchIndicator->indicator();
1393 QQuickItem *ci = d->clearIndicator->indicator();
1394 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1395 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1399void QQuickSearchField::hoverMoveEvent(QHoverEvent *event)
1401 Q_D(QQuickSearchField);
1402 QQuickControl::hoverMoveEvent(event);
1403 QQuickItem *si = d->searchIndicator->indicator();
1404 QQuickItem *ci = d->clearIndicator->indicator();
1405 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1406 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1410void QQuickSearchField::hoverLeaveEvent(QHoverEvent *event)
1412 Q_D(QQuickSearchField);
1413 QQuickControl::hoverLeaveEvent(event);
1414 d->searchIndicator->setHovered(
false);
1415 d->clearIndicator->setHovered(
false);
1419void QQuickSearchField::keyPressEvent(QKeyEvent *event)
1421 Q_D(QQuickSearchField);
1423 const auto key = event->key();
1424 const bool hasModel = !d->suggestionModel.isNull();
1425 const bool hasText = !d->text.isEmpty();
1428 case Qt::Key_Escape:
1430 if (d->isPopupVisible()) {
1431 d->hidePopup(
false);
1433 }
else if (hasText) {
1438 case Qt::Key_Return:
1440 if (d->isPopupVisible())
1443 emit searchTriggered();
1447 if (hasModel && hasText) {
1448 d->decreaseCurrentIndex();
1453 if (hasModel && hasText) {
1454 d->increaseCurrentIndex();
1459 if (d->isPopupVisible()) {
1460 d->setHighlightedIndex(0, Highlight);
1465 if (d->isPopupVisible()) {
1466 d->setHighlightedIndex(suggestionCount() - 1, Highlight);
1471 QQuickControl::keyPressEvent(event);
1476void QQuickSearchField::classBegin()
1478 Q_D(QQuickSearchField);
1479 QQuickControl::classBegin();
1481 QQmlContext *context = qmlContext(
this);
1483 QQmlEngine::setContextForObject(d->searchIndicator, context);
1484 QQmlEngine::setContextForObject(d->clearIndicator, context);
1488void QQuickSearchField::componentComplete()
1490 Q_D(QQuickSearchField);
1491 QQuickIndicatorButtonPrivate::get(d->searchIndicator)->executeIndicator(
true);
1492 QQuickIndicatorButtonPrivate::get(d->clearIndicator)->executeIndicator(
true);
1493 QQuickControl::componentComplete();
1496 d->executePopup(
true);
1498 if (d->delegateModel && d->ownModel)
1499 static_cast<QQmlDelegateModel *>(d->delegateModel)->componentComplete();
1502void QQuickSearchField::contentItemChange(QQuickItem *newItem, QQuickItem *oldItem)
1504 Q_D(QQuickSearchField);
1506 oldItem->removeEventFilter(
this);
1507 if (QQuickTextInput *oldInput = qobject_cast<QQuickTextInput *>(oldItem)) {
1508 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::textChanged, d,
1509 &QQuickSearchFieldPrivate::updateText);
1510 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::cursorPositionChanged,
1511 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1516 newItem->installEventFilter(
this);
1517 if (QQuickTextInput *newInput = qobject_cast<QQuickTextInput *>(newItem)) {
1518 QObjectPrivate::connect(newInput, &QQuickTextInput::textChanged, d,
1519 &QQuickSearchFieldPrivate::updateText);
1520 QObjectPrivate::connect(newInput, &QQuickTextInput::cursorPositionChanged,
1521 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1523 #if QT_CONFIG(cursor)
1524 newItem->setCursor(Qt::IBeamCursor);
1529void QQuickSearchField::itemChange(ItemChange change,
const ItemChangeData &data)
1531 Q_D(QQuickSearchField);
1532 QQuickControl::itemChange(change, data);
1533 if (change == ItemVisibleHasChanged && !data.boolValue) {
1534 d->hidePopup(
false);
1535 d->setCurrentItemAtIndex(-1, NoActivate);
1541#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.