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;
1051 QQuickPopupPrivate::get(popup)->wmWindowType = QNativeInterface::Private::QXcbWindow::Combo;
1053 QQuickPopupPrivate::get(popup)->allowVerticalFlip =
true;
1054 popup->setClosePolicy(QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutsideParent);
1055 QObjectPrivate::connect(popup, &QQuickPopup::visibleChanged, d,
1056 &QQuickSearchFieldPrivate::popupVisibleChanged);
1059 QObjectPrivate::connect(popup, &QQuickPopup::destroyed, d,
1060 &QQuickSearchFieldPrivate::popupDestroyed);
1062#if QT_CONFIG(quick_itemview)
1063 if (QQuickItemView *itemView = popup->findChild<QQuickItemView *>())
1064 itemView->setHighlightRangeMode(QQuickItemView::NoHighlightRange);
1069 if (!d->popup.isExecuting())
1070 emit popupChanged();
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096QQmlComponent *QQuickSearchField::delegate()
const
1098 Q_D(
const QQuickSearchField);
1102void QQuickSearchField::setDelegate(QQmlComponent *delegate)
1104 Q_D(QQuickSearchField);
1105 if (d->delegate == delegate)
1108 d->delegate = delegate;
1109 QQmlDelegateModel *delegateModel = qobject_cast<QQmlDelegateModel *>(d->delegateModel);
1111 delegateModel->setDelegate(d->delegate);
1112 emit delegateChanged();
1116
1117
1118
1119
1120
1121
1122QString QQuickSearchField::placeholderText()
const
1124 Q_D(
const QQuickSearchField);
1125 return d->placeholderText;
1128void QQuickSearchField::setPlaceholderText(
const QString &text)
1130 Q_D(QQuickSearchField);
1131 if (d->placeholderText == text)
1134 d->placeholderText = text;
1135 emit placeholderTextChanged();
1139
1140
1141
1142
1143
1144
1145
1146bool QQuickSearchField::selectTextByMouse()
const
1148 Q_D(
const QQuickSearchField);
1149 return d->selectTextByMouse;
1152void QQuickSearchField::setSelectTextByMouse(
const bool selectable)
1154 Q_D(QQuickSearchField);
1155 if (d->selectTextByMouse == selectable)
1158 d->selectTextByMouse = selectable;
1159 emit selectTextByMouseChanged();
1163
1164
1165
1166
1167
1168
1169QString QQuickSearchField::selectedText()
const
1171 Q_D(
const QQuickSearchField);
1172 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1175 return input->selectedText();
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190int QQuickSearchField::selectionStart()
const
1192 Q_D(
const QQuickSearchField);
1193 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1196 return input->selectionStart();
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211int QQuickSearchField::selectionEnd()
const
1213 Q_D(
const QQuickSearchField);
1214 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1217 return input->selectionEnd();
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234int QQuickSearchField::cursorPosition()
const
1236 Q_D(
const QQuickSearchField);
1237 return d->cursorPosition;
1240void QQuickSearchField::setCursorPosition(
int position)
1242 Q_D(QQuickSearchField);
1243 if (d->cursorPosition == position)
1246 d->cursorPosition = position;
1248 if (QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem)) {
1249 if (input->cursorPosition() != position)
1250 input->setCursorPosition(position);
1253 emit cursorPositionChanged();
1257
1258
1259
1260
1261
1262void QQuickSearchField::selectAll()
1264 Q_D(QQuickSearchField);
1265 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285void QQuickSearchField::select(
int start,
int end)
1287 Q_D(QQuickSearchField);
1288 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1291 input->select(start, end);
1295
1296
1297
1298
1299
1300
1301
1302void QQuickSearchField::selectWord()
1304 Q_D(QQuickSearchField);
1305 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1308 input->selectWord();
1312
1313
1314
1315
1316
1317
1318
1319void QQuickSearchField::deselect()
1321 Q_D(QQuickSearchField);
1322 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1328bool QQuickSearchField::eventFilter(QObject *object, QEvent *event)
1330 Q_D(QQuickSearchField);
1332 switch (event->type()) {
1333 case QEvent::MouseButtonRelease: {
1334 QQuickTextInput *input = qobject_cast<QQuickTextInput *>(d->contentItem);
1335 if (input->hasFocus() && !d->text.isEmpty() && !d->isPopupVisible()
1336 && (d->delegateModel && d->delegateModel->count() > 0)
1337 &&
static_cast<QMouseEvent*>(event)->button() == Qt::LeftButton) {
1342 case QEvent::FocusOut: {
1343 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1344 const bool usingPopupWindows =
1345 d->popup ? QQuickPopupPrivate::get(d->popup)->usePopupWindow() :
false;
1346 if (qGuiApp->focusObject() !=
this && !(hasActiveFocus && !usingPopupWindows))
1347 d->hidePopup(
false);
1354 return QQuickControl::eventFilter(object, event);
1357void QQuickSearchField::focusInEvent(QFocusEvent *event)
1359 Q_D(QQuickSearchField);
1360 QQuickControl::focusInEvent(event);
1362 if (!d->contentItem)
1365 const auto reason = event->reason();
1367 case Qt::TabFocusReason:
1368 case Qt::BacktabFocusReason:
1369 case Qt::ShortcutFocusReason:
1370 case Qt::OtherFocusReason:
1371 if (reason != Qt::OtherFocusReason || !d->isPopupVisible())
1372 d->contentItem->forceActiveFocus(reason);
1379void QQuickSearchField::focusOutEvent(QFocusEvent *event)
1381 Q_D(QQuickSearchField);
1382 QQuickControl::focusOutEvent(event);
1384 const bool hasActiveFocus = d->popup && d->popup->hasActiveFocus();
1385 const bool usingPopupWindows = d->popup && QQuickPopupPrivate::get(d->popup)->usePopupWindow();
1387 if (qGuiApp->focusObject() != d->contentItem && !(hasActiveFocus && !usingPopupWindows))
1388 d->hidePopup(
false);
1391void QQuickSearchField::hoverEnterEvent(QHoverEvent *event)
1393 Q_D(QQuickSearchField);
1394 QQuickControl::hoverEnterEvent(event);
1395 QQuickItem *si = d->searchIndicator->indicator();
1396 QQuickItem *ci = d->clearIndicator->indicator();
1397 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1398 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1402void QQuickSearchField::hoverMoveEvent(QHoverEvent *event)
1404 Q_D(QQuickSearchField);
1405 QQuickControl::hoverMoveEvent(event);
1406 QQuickItem *si = d->searchIndicator->indicator();
1407 QQuickItem *ci = d->clearIndicator->indicator();
1408 d->searchIndicator->setHovered(si && si->isEnabled() && si->contains(mapToItem(si, event->position())));
1409 d->clearIndicator->setHovered(ci && ci->isEnabled() && ci->contains(mapToItem(ci, event->position())));
1413void QQuickSearchField::hoverLeaveEvent(QHoverEvent *event)
1415 Q_D(QQuickSearchField);
1416 QQuickControl::hoverLeaveEvent(event);
1417 d->searchIndicator->setHovered(
false);
1418 d->clearIndicator->setHovered(
false);
1422void QQuickSearchField::keyPressEvent(QKeyEvent *event)
1424 Q_D(QQuickSearchField);
1426 const auto key = event->key();
1427 const bool hasModel = !d->suggestionModel.isNull();
1428 const bool hasText = !d->text.isEmpty();
1431 case Qt::Key_Escape:
1433 if (d->isPopupVisible()) {
1434 d->hidePopup(
false);
1436 }
else if (hasText) {
1441 case Qt::Key_Return:
1443 if (d->isPopupVisible())
1446 emit searchTriggered();
1451 d->decreaseCurrentIndex();
1457 d->increaseCurrentIndex();
1462 if (d->isPopupVisible()) {
1463 d->setHighlightedIndex(0, Highlight);
1468 if (d->isPopupVisible()) {
1469 d->setHighlightedIndex(suggestionCount() - 1, Highlight);
1474 QQuickControl::keyPressEvent(event);
1479void QQuickSearchField::classBegin()
1481 Q_D(QQuickSearchField);
1482 QQuickControl::classBegin();
1484 QQmlContext *context = qmlContext(
this);
1486 QQmlEngine::setContextForObject(d->searchIndicator, context);
1487 QQmlEngine::setContextForObject(d->clearIndicator, context);
1491void QQuickSearchField::componentComplete()
1493 Q_D(QQuickSearchField);
1494 QQuickIndicatorButtonPrivate::get(d->searchIndicator)->executeIndicator(
true);
1495 QQuickIndicatorButtonPrivate::get(d->clearIndicator)->executeIndicator(
true);
1496 QQuickControl::componentComplete();
1499 d->executePopup(
true);
1501 if (d->delegateModel && d->ownModel)
1502 static_cast<QQmlDelegateModel *>(d->delegateModel)->componentComplete();
1505void QQuickSearchField::contentItemChange(QQuickItem *newItem, QQuickItem *oldItem)
1507 Q_D(QQuickSearchField);
1509 oldItem->removeEventFilter(
this);
1510 if (QQuickTextInput *oldInput = qobject_cast<QQuickTextInput *>(oldItem)) {
1511 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::textChanged, d,
1512 &QQuickSearchFieldPrivate::updateText);
1513 QObjectPrivate::disconnect(oldInput, &QQuickTextInput::cursorPositionChanged,
1514 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1519 newItem->installEventFilter(
this);
1520 if (QQuickTextInput *newInput = qobject_cast<QQuickTextInput *>(newItem)) {
1521 QObjectPrivate::connect(newInput, &QQuickTextInput::textChanged, d,
1522 &QQuickSearchFieldPrivate::updateText);
1523 QObjectPrivate::connect(newInput, &QQuickTextInput::cursorPositionChanged,
1524 d, &QQuickSearchFieldPrivate::updateCursorPosition);
1526 #if QT_CONFIG(cursor)
1527 newItem->setCursor(Qt::IBeamCursor);
1532void QQuickSearchField::itemChange(ItemChange change,
const ItemChangeData &data)
1534 Q_D(QQuickSearchField);
1535 QQuickControl::itemChange(change, data);
1536 if (change == ItemVisibleHasChanged && !data.boolValue) {
1537 d->hidePopup(
false);
1538 d->setCurrentItemAtIndex(-1, NoActivate);
1544#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.