31 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
32 Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged3 FINAL)
33 Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged3 FINAL)
34 Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
35 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
36 Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
38 Q_PROPERTY(
bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
39 Q_PROPERTY(
bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
41 Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
42 Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
43 Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
44 Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
45 Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
46 Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
47 Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
48 Q_CLASSINFO(
"DeferredPropertyNames",
"background")
49 QML_NAMED_ELEMENT(TextField)
50 QML_ADDED_IN_VERSION(2, 0)
53 explicit QQuickTextField(QQuickItem *parent =
nullptr);
57 void setFont(
const QFont &font);
59 QQuickItem *background()
const;
60 void setBackground(QQuickItem *background);
62 QString placeholderText()
const;
63 void setPlaceholderText(
const QString &text);
65 Qt::FocusReason focusReason()
const;
66 void setFocusReason(Qt::FocusReason reason);
69 bool isHovered()
const;
70 void setHovered(
bool hovered);
72 bool isHoverEnabled()
const;
73 void setHoverEnabled(
bool enabled);
74 void resetHoverEnabled();
77 QColor placeholderTextColor()
const;
78 void setPlaceholderTextColor(
const QColor &color);
80 qreal implicitBackgroundWidth()
const;
81 qreal implicitBackgroundHeight()
const;
83 qreal topInset()
const;
84 void setTopInset(qreal inset);
87 qreal leftInset()
const;
88 void setLeftInset(qreal inset);
89 void resetLeftInset();
91 qreal rightInset()
const;
92 void setRightInset(qreal inset);
93 void resetRightInset();
95 qreal bottomInset()
const;
96 void setBottomInset(qreal inset);
97 void resetBottomInset();
101 void implicitWidthChanged3();
102 void implicitHeightChanged3();
103 void backgroundChanged();
104 void placeholderTextChanged();
105 void focusReasonChanged();
106 void pressAndHold(QQuickMouseEvent *event);
108 Q_REVISION(2, 1)
void pressed(QQuickMouseEvent *event);
109 Q_REVISION(2, 1)
void released(QQuickMouseEvent *event);
110 Q_REVISION(2, 1)
void hoveredChanged();
111 Q_REVISION(2, 1)
void hoverEnabledChanged();
113 Q_REVISION(2, 5)
void placeholderTextColorChanged();
114 Q_REVISION(2, 5)
void implicitBackgroundWidthChanged();
115 Q_REVISION(2, 5)
void implicitBackgroundHeightChanged();
116 Q_REVISION(2, 5)
void topInsetChanged();
117 Q_REVISION(2, 5)
void leftInsetChanged();
118 Q_REVISION(2, 5)
void rightInsetChanged();
119 Q_REVISION(2, 5)
void bottomInsetChanged();
122 friend struct QQuickPressHandler;
124 void classBegin() override;
125 void componentComplete() override;
127 void itemChange(ItemChange change,
const ItemChangeData &value) override;
128 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
129 virtual void insetChange(
const QMarginsF &newInset,
const QMarginsF &oldInset);
131 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
133 void focusInEvent(QFocusEvent *event) override;
134 void focusOutEvent(QFocusEvent *event) override;
135#if QT_CONFIG(quicktemplates2_hover)
136 void hoverEnterEvent(QHoverEvent *event) override;
137 void hoverLeaveEvent(QHoverEvent *event) override;
139 void mousePressEvent(QMouseEvent *event) override;
140 void mouseMoveEvent(QMouseEvent *event) override;
141 void mouseReleaseEvent(QMouseEvent *event) override;
142 void mouseDoubleClickEvent(QMouseEvent *event) override;
143 void timerEvent(QTimerEvent *event) override;
146 Q_DISABLE_COPY(QQuickTextField)
147 Q_DECLARE_PRIVATE(QQuickTextField)
void readOnlyChanged(bool isReadOnly)
bool setLastFocusChangeReason(Qt::FocusReason reason) override
QQuickDeferredPointer< QQuickItem > background
void setTopInset(qreal value, bool reset=false)
void setLeftInset(qreal value, bool reset=false)
void setRightInset(qreal value, bool reset=false)
void setBottomInset(qreal value, bool reset=false)
void itemDestroyed(QQuickItem *item) override
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
void itemImplicitWidthChanged(QQuickItem *item) override
void attachFlickable(QQuickFlickable *flickable)
void itemImplicitHeightChanged(QQuickItem *item) override
static QQuickTextAreaPrivate * get(QQuickTextArea *item)