9import org.kde.kirigami as Kirigami
27Kirigami.ActionTextField {
41 property bool autoAccept: true
58 property bool delaySearch: false
61 leftPadding: if (effectiveHorizontalAlignment === TextInput.AlignRight) {
62 return _rightActionsRow.width + Kirigami.Units.smallSpacing
64 return searchIcon.width + Kirigami.Units.smallSpacing * 3
66 rightPadding: if (effectiveHorizontalAlignment === TextInput.AlignRight) {
67 return searchIcon.width + Kirigami.Units.smallSpacing * 3
69 return _rightActionsRow.width + Kirigami.Units.smallSpacing
74 LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight
75 anchors.left: root.left
76 anchors.leftMargin: Kirigami.Units.smallSpacing * 2
77 anchors.verticalCenter: root.verticalCenter
78 anchors.verticalCenterOffset: Math.round((root.topPadding - root.bottomPadding) / 2)
79 implicitHeight: Kirigami.Units.iconSizes.sizeForLabels
80 implicitWidth: Kirigami.Units.iconSizes.sizeForLabels
81 color: root.placeholderTextColor
86 placeholderText: qsTr(
"Search…")
88 Accessible.name: qsTr("Search")
89 Accessible.searchEdit: true
91 focusSequence: StandardKey.Find
92 inputMethodHints:
Qt.ImhNoPredictiveText
93 EnterKey.type:
Qt.EnterKeySearch
97 icon.name: root.effectiveHorizontalAlignment === TextInput.AlignRight ?
"edit-clear-locationbar-ltr" :
"edit-clear-locationbar-rtl"
98 visible: root.text.length > 0
99 text: qsTr(
"Clear search")
105 fireSearchDelay.stop();
113 interval: root.delaySearch ? Kirigami.Units.humanMoment : Kirigami.Units.shortDuration
117 if (root.acceptableInput) {
123 fireSearchDelay.running =
false
126 if (root.autoAccept) {
127 fireSearchDelay.restart();
129 fireSearchDelay.stop();
An item that represents an abstract Action.
QAction * repeat(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.