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);
417 if (q->suggestionCount() == 0)
421 if (!text.isEmpty()) {
422 for (
int idx = 0; idx < q->suggestionCount(); ++idx) {
423 QString t = textAt(idx);
432 emit q->suggestionCountChanged();
437 Q_Q(QQuickSearchField);
438 if (isPopupVisible()) {
439 if (highlightedIndex < q->suggestionCount() - 1)
446 if (isPopupVisible()) {
454 Q_Q(QQuickSearchField);
459 emit q->currentIndexChanged();
464 Q_Q(QQuickSearchField);
469 emit q->currentIndexChanged();
474 emit q->activated(index);
479 Q_Q(QQuickSearchField);
482 if (isPopupVisible()) {
485 else if (q->suggestionCount() > 0)
494 Q_Q(QQuickSearchField);
499 emit q->highlightedIndexChanged();
502 emit q->highlighted(index);
507 Q_Q(QQuickSearchField);
512 const QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
516 const int pos = input->cursorPosition();
521 emit q->cursorPositionChanged();
526 Q_Q(QQuickSearchField);
531 disconnect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
533 disconnect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
538 delegateModel = suggestionModel.value<QQmlInstanceModel *>();
540 if (!delegateModel && suggestionModel.isValid()) {
541 QQmlDelegateModel *dataModel =
new QQmlDelegateModel(qmlContext(q), q);
542 dataModel->setModel(suggestionModel);
544 if (q->isComponentComplete())
545 dataModel->componentComplete();
552 connect(
delegateModel, &QQmlInstanceModel::countChanged,
this,
554 connect(
delegateModel, &QQmlInstanceModel::createdItem,
this,
558 emit q->delegateModelChanged();
566 return textRole.isEmpty() ? QStringLiteral(
"modelData") : textRole;
571 Q_Q(QQuickSearchField);
572 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
576 const QString textInput = input->text();
578 if (text != textInput) {
579 q->setText(textInput);
580 emit q->textEdited();
586 emit q->searchTriggered();
589 if (text.isEmpty()) {
590 if (isPopupVisible())
594 if (!isPopupVisible())
597 if (isPopupVisible())
605 Q_Q(QQuickSearchField);
606 const QString currentText = textAt(currentIndex);
608 if (text != currentText)
609 q->setText(currentText);
627 Q_Q(QQuickSearchField);
628 quickCancelDeferred(q, popupName());
633 Q_Q(QQuickSearchField);
634 if (popup.wasExecuted())
637 if (!popup || complete)
638 quickBeginDeferred(q, popupName(), popup);
640 quickCompleteDeferred(q, popupName(), popup);
645 Q_Q(QQuickSearchField);
646 QQuickControlPrivate::handlePress(point, timestamp);
650 const bool isSearch = si && si->isEnabled() && si->contains(q->mapToItem(si, point));
651 const bool isClear = ci && ci->isEnabled() && ci->contains(q->mapToItem(ci, point));
656 }
else if (isClear) {
666 QQuickControlPrivate::handleRelease(point, timestamp);
676 Q_Q(QQuickSearchField);
678 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(contentItem);
682 input->forceActiveFocus();
683 emit q->searchButtonPressed();
688 Q_Q(QQuickSearchField);
694 if (!text.isEmpty()) {
697 q->setText(QString());
699 if (isPopupVisible())
702 emit q->clearButtonPressed();
708 QQuickControlPrivate::itemImplicitWidthChanged(item);
710 emit searchIndicator->implicitIndicatorWidthChanged();
712 emit clearIndicator->implicitIndicatorWidthChanged();
717 QQuickControlPrivate::itemImplicitHeightChanged(item);
719 emit searchIndicator->implicitIndicatorHeightChanged();
721 emit clearIndicator->implicitIndicatorHeightChanged();
726 QQuickControlPrivate::itemDestroyed(item);
733QQuickSearchField::QQuickSearchField(QQuickItem *parent)
734 : QQuickControl(*(
new QQuickSearchFieldPrivate), parent)
736 Q_D(QQuickSearchField);
737 d->searchIndicator =
new QQuickIndicatorButton(
this);
738 d->clearIndicator =
new QQuickIndicatorButton(
this);
740 setFocusPolicy(Qt::StrongFocus);
741 setFlag(QQuickItem::ItemIsFocusScope);
742 setAcceptedMouseButtons(Qt::LeftButton);
744 setCursor(Qt::ArrowCursor);
750QQuickSearchField::~QQuickSearchField()
752 Q_D(QQuickSearchField);
753 d->removeImplicitSizeListener(d->searchIndicator->indicator());
754 d->removeImplicitSizeListener(d->clearIndicator->indicator());
757 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
758 &QQuickSearchFieldPrivate::popupVisibleChanged);
759 d->hideOldPopup(d->popup);
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
783QVariant QQuickSearchField::suggestionModel()
const
785 Q_D(
const QQuickSearchField);
786 return d->suggestionModel;
789void QQuickSearchField::setSuggestionModel(
const QVariant &model)
791 Q_D(QQuickSearchField);
793 QVariant suggestionModel;
794 if (QJSValue *value = get_if<QJSValue>(&suggestionModel))
795 suggestionModel = value->toVariant();
797 suggestionModel = model;
799 if (d->suggestionModel == suggestionModel)
802 d->suggestionModel = suggestionModel;
803 d->createDelegateModel();
804 emit suggestionCountChanged();
805 emit suggestionModelChanged();
809
810
811
812
813
814
815
816
817
818QQmlInstanceModel *QQuickSearchField::delegateModel()
const
820 Q_D(
const QQuickSearchField);
821 return d->delegateModel;
825
826
827
828
829
830int QQuickSearchField::suggestionCount()
const
832 Q_D(
const QQuickSearchField);
833 return d->delegateModel ? d->delegateModel->count() : 0;
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854int QQuickSearchField::currentIndex()
const
856 Q_D(
const QQuickSearchField);
857 return d->currentIndex;
860void QQuickSearchField::setCurrentIndex(
int index)
862 Q_D(QQuickSearchField);
863 d->hasCurrentIndex =
true;
864 d->setCurrentIndex(index);
868
869
870
871
872
873
874
875
876
877
878
879
880int QQuickSearchField::highlightedIndex()
const
882 Q_D(
const QQuickSearchField);
883 return d->highlightedIndex;
887
888
889
890
891
892
893
894
895QString QQuickSearchField::text()
const
897 Q_D(
const QQuickSearchField);
901void QQuickSearchField::setText(
const QString &text)
903 Q_D(QQuickSearchField);
912
913
914
915
916
917
918
919
920QString QQuickSearchField::textRole()
const
922 Q_D(
const QQuickSearchField);
926void QQuickSearchField::setTextRole(
const QString &textRole)
928 Q_D(QQuickSearchField);
929 if (d->textRole == textRole)
932 d->textRole = textRole;
936
937
938
939
940
941
942
943
944
945
946
947
949bool QQuickSearchField::isLive()
const
951 Q_D(
const QQuickSearchField);
955void QQuickSearchField::setLive(
const bool live)
957 Q_D(QQuickSearchField);
966
967
968
969
970
971
972
973
974
975
976
977
978QQuickIndicatorButton *QQuickSearchField::searchIndicator()
const
980 Q_D(
const QQuickSearchField);
981 return d->searchIndicator;
985
986
987
988
989
990
991
992
993
994
995
996
997QQuickIndicatorButton *QQuickSearchField::clearIndicator()
const
999 Q_D(
const QQuickSearchField);
1000 return d->clearIndicator;
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015QQuickPopup *QQuickSearchField::popup()
const
1017 QQuickSearchFieldPrivate *d =
const_cast<QQuickSearchFieldPrivate *>(d_func());
1019 d->executePopup(isComponentComplete());
1023void QQuickSearchField::setPopup(QQuickPopup *popup)
1025 Q_D(QQuickSearchField);
1026 if (d->popup == popup)
1029 if (!d->popup.isExecuting())
1033 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::destroyed, d,
1034 &QQuickSearchFieldPrivate::popupDestroyed);
1035 QObjectPrivate::disconnect(d->popup.data(), &QQuickPopup::visibleChanged, d,
1036 &QQuickSearchFieldPrivate::popupVisibleChanged);
1037 QQuickSearchFieldPrivate::hideOldPopup(d->popup);
1041#if QT_CONFIG(wayland)
1042 QQuickPopupPrivate::get(popup)->extendedWindowType = QNativeInterface::Private::QWaylandWindow::ComboBox;
1044 QQuickPopupPrivate::get(popup)->allowVerticalFlip =
true;
1045 popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
1046 QObjectPrivate::connect(popup, &QQuickPopup::visibleChanged, d,
1047 &QQuickSearchFieldPrivate::popupVisibleChanged);
1050 QObjectPrivate::connect(popup, &QQuickPopup::destroyed, d,
1051 &QQuickSearchFieldPrivate::popupDestroyed);
1053#if QT_CONFIG(quick_itemview)
1054 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
1055 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
1060 if (!d->popup.isExecuting())
1061 emit popupChanged();
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087QQmlComponent *QQuickSearchField::delegate()
const
1089 Q_D(
const QQuickSearchField);
1093void QQuickSearchField::setDelegate(QQmlComponent *delegate)
1095 Q_D(QQuickSearchField);
1096 if (d->delegate == delegate)
1099 d->delegate = delegate;
1100 QQmlDelegateModel *delegateModel = qobject_cast<QQmlDelegateModel *>(d->delegateModel);
1102 delegateModel->setDelegate(d->delegate);
1103 emit delegateChanged();
1107
1108
1109
1110
1111
1112
1113QString QQuickSearchField::placeholderText()
const
1115 Q_D(
const QQuickSearchField);
1116 return d->placeholderText;
1119void QQuickSearchField::setPlaceholderText(
const QString &text)
1121 Q_D(QQuickSearchField);
1122 if (d->placeholderText == text)
1125 d->placeholderText = text;
1126 emit placeholderTextChanged();
1130
1131
1132
1133
1134
1135
1136
1137bool QQuickSearchField::selectTextByMouse()
const
1139 Q_D(
const QQuickSearchField);
1140 return d->selectTextByMouse;
1143void QQuickSearchField::setSelectTextByMouse(
const bool selectable)
1145 Q_D(QQuickSearchField);
1146 if (d->selectTextByMouse == selectable)
1149 d->selectTextByMouse = selectable;
1150 emit selectTextByMouseChanged();
1154
1155
1156
1157
1158
1159
1160QString QQuickSearchField::selectedText()
const
1162 Q_D(
const QQuickSearchField);
1163 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1166 return input->selectedText();
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181int QQuickSearchField::selectionStart()
const
1183 Q_D(
const QQuickSearchField);
1184 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1187 return input->selectionStart();
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202int QQuickSearchField::selectionEnd()
const
1204 Q_D(
const QQuickSearchField);
1205 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1208 return input->selectionEnd();
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225int QQuickSearchField::cursorPosition()
const
1227 Q_D(
const QQuickSearchField);
1228 return d->cursorPosition;
1231void QQuickSearchField::setCursorPosition(
int position)
1233 Q_D(QQuickSearchField);
1234 if (d->cursorPosition == position)
1237 d->cursorPosition = position;
1239 if (QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem)) {
1240 if (input->cursorPosition() != position)
1241 input->setCursorPosition(position);
1244 emit cursorPositionChanged();
1248
1249
1250
1251
1252
1253void QQuickSearchField::selectAll()
1255 Q_D(QQuickSearchField);
1256 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276void QQuickSearchField::select(
int start,
int end)
1278 Q_D(QQuickSearchField);
1279 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1282 input->select(start, end);
1286
1287
1288
1289
1290
1291
1292
1293void QQuickSearchField::selectWord()
1295 Q_D(QQuickSearchField);
1296 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1299 input->selectWord();
1303
1304
1305
1306
1307
1308
1309
1310void QQuickSearchField::deselect()
1312 Q_D(QQuickSearchField);
1313 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1319bool QQuickSearchField::eventFilter(QObject *object, QEvent *event)
1321 Q_D(QQuickSearchField);
1323 switch (event->type()) {
1324 case QEvent::MouseButtonRelease: {
1325 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1326 if (input->hasFocus() && !d->text.isEmpty() && !d->isPopupVisible()
1327 && (d->delegateModel && d->delegateModel->count() > 0)
1328 &&
static_cast<QMouseEvent*>(event)->button() == Qt::LeftButton) {
1333 case QEvent::FocusOut: {
1334 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1335 const bool usingPopupWindows =
1336 d->popup ? QQuickPopupPrivate::get(d->popup)->usePopupWindow() :
false;
1337 if (qGuiApp->focusObject() !=
this && !(hasActiveFocus && !usingPopupWindows))
1338 d->hidePopup(
false);
1344 return QQuickControl::eventFilter(object, event);
1347void QQuickSearchField::focusInEvent(QFocusEvent *event)
1349 Q_D(QQuickSearchField);
1350 QQuickControl::focusInEvent(event);
1352 if (!d->contentItem)
1355 const auto reason = event->reason();
1357 case Qt::TabFocusReason:
1358 case Qt::BacktabFocusReason:
1359 case Qt::ShortcutFocusReason:
1360 case Qt::OtherFocusReason:
1361 if (reason != Qt::OtherFocusReason || !d->isPopupVisible())
1362 d->contentItem->forceActiveFocus(reason);
1369void QQuickSearchField::focusOutEvent(QFocusEvent *event)
1371 Q_D(QQuickSearchField);
1372 QQuickControl::focusOutEvent(event);
1374 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1375 const bool usingPopupWindows = d->popup && QQuickPopupPrivate::get(d->popup)->usePopupWindow();
1377 if (qGuiApp->focusObject() != d->contentItem && !(hasActiveFocus && !usingPopupWindows))
1378 d->hidePopup(
false);
1381void QQuickSearchField::hoverEnterEvent(QHoverEvent *event)
1383 Q_D(QQuickSearchField);
1384 QQuickControl::hoverEnterEvent(event);
1385 QQuickItem *si = d->searchIndicator->indicator();
1386 QQuickItem *ci = d->clearIndicator->indicator();
1387 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1388 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1392void QQuickSearchField::hoverMoveEvent(QHoverEvent *event)
1394 Q_D(QQuickSearchField);
1395 QQuickControl::hoverMoveEvent(event);
1396 QQuickItem *si = d->searchIndicator->indicator();
1397 QQuickItem *ci = d->clearIndicator->indicator();
1398 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1399 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1403void QQuickSearchField::hoverLeaveEvent(QHoverEvent *event)
1405 Q_D(QQuickSearchField);
1406 QQuickControl::hoverLeaveEvent(event);
1407 d->searchIndicator->setHovered(
false);
1408 d->clearIndicator->setHovered(
false);
1412void QQuickSearchField::keyPressEvent(QKeyEvent *event)
1414 Q_D(QQuickSearchField);
1416 const auto key = event->key();
1417 const bool hasModel = !d->suggestionModel.isNull();
1418 const bool hasText = !d->text.isEmpty();
1421 case Qt::Key_Escape:
1423 if (d->isPopupVisible()) {
1424 d->hidePopup(
false);
1426 }
else if (hasText) {
1431 case Qt::Key_Return:
1433 if (d->isPopupVisible())
1436 emit searchTriggered();
1440 if (hasModel && hasText) {
1441 d->decreaseCurrentIndex();
1446 if (hasModel && hasText) {
1447 d->increaseCurrentIndex();
1452 if (d->isPopupVisible()) {
1453 d->setHighlightedIndex(0, Highlight);
1458 if (d->isPopupVisible()) {
1459 d->setHighlightedIndex(suggestionCount() - 1, Highlight);
1464 QQuickControl::keyPressEvent(event);
1469void QQuickSearchField::classBegin()
1471 Q_D(QQuickSearchField);
1472 QQuickControl::classBegin();
1474 QQmlContext *context = qmlContext(
this);
1476 QQmlEngine::setContextForObject(d->searchIndicator, context);
1477 QQmlEngine::setContextForObject(d->clearIndicator, context);
1481void QQuickSearchField::componentComplete()
1483 Q_D(QQuickSearchField);
1484 QQuickIndicatorButtonPrivate::get(d->searchIndicator)->executeIndicator(
true);
1485 QQuickIndicatorButtonPrivate::get(d->clearIndicator)->executeIndicator(
true);
1486 QQuickControl::componentComplete();
1489 d->executePopup(
true);
1491 if (d->delegateModel && d->ownModel)
1492 static_cast<QQmlDelegateModel *>(d->delegateModel)->componentComplete();
1495void QQuickSearchField::contentItemChange(QQuickItem *newItem, QQuickItem *oldItem)
1497 Q_D(QQuickSearchField);
1499 oldItem->removeEventFilter(
this);
1500 if (QQuickTextInput *oldInput = qobject_cast<QQuickTextInput *>(oldItem)) {
1501 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::textChanged, d,
1502 &QQuickSearchFieldPrivate::updateText);
1503 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::cursorPositionChanged,
1504 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1509 newItem->installEventFilter(
this);
1510 if (QQuickTextInput *newInput = qobject_cast<QQuickTextInput *>(newItem)) {
1511 QObjectPrivate::connect(newInput, &QQuickTextInput::textChanged, d,
1512 &QQuickSearchFieldPrivate::updateText);
1513 QObjectPrivate::connect(newInput, &QQuickTextInput::cursorPositionChanged,
1514 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1516 #if QT_CONFIG(cursor)
1517 newItem->setCursor(Qt::IBeamCursor);
1522void QQuickSearchField::itemChange(ItemChange change,
const ItemChangeData &data)
1524 Q_D(QQuickSearchField);
1525 QQuickControl::itemChange(change, data);
1526 if (change == ItemVisibleHasChanged && !data.boolValue) {
1527 d->hidePopup(
false);
1528 d->setCurrentItemAtIndex(-1, NoActivate);
1534#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.