Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicktooltip_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKTOOLTIP_P_H
5#define QQUICKTOOLTIP_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuickTemplates2/private/qquickpopup_p.h>
19
21
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickToolTip : public QQuickPopup
27{
29 Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
30 Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL)
31 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
32 QML_NAMED_ELEMENT(ToolTip)
35
36public:
37 explicit QQuickToolTip(QQuickItem *parent = nullptr);
38
39 QString text() const;
40 void setText(const QString &text);
41
42 int delay() const;
43 void setDelay(int delay);
44
45 int timeout() const;
46 void setTimeout(int timeout);
47
48 void setVisible(bool visible) override;
49
50 static QQuickToolTipAttached *qmlAttachedProperties(QObject *object);
51
54 void delayChanged();
55 void timeoutChanged();
56
57public Q_SLOTS:
58 Q_REVISION(2, 5) void show(const QString &text, int ms = -1);
59 Q_REVISION(2, 5) void hide();
60
61protected:
62 QFont defaultFont() const override;
63
64 void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override;
65 void timerEvent(QTimerEvent *event) override;
66
67#if QT_CONFIG(accessibility)
68 QAccessible::Role accessibleRole() const override;
69 void accessibilityActiveChanged(bool active) override;
70#endif
71
72private:
73 Q_DISABLE_COPY(QQuickToolTip)
74 Q_DECLARE_PRIVATE(QQuickToolTip)
75};
76
77class Q_QUICKTEMPLATES2_EXPORT QQuickToolTipAttached : public QObject
78{
80 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
81 Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
82 Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL)
83 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
84 Q_PROPERTY(QQuickToolTip *toolTip READ toolTip CONSTANT FINAL)
85
86public:
87 explicit QQuickToolTipAttached(QObject *parent = nullptr);
88
89 QString text() const;
90 void setText(const QString &text);
91
92 int delay() const;
93 void setDelay(int delay);
94
95 int timeout() const;
96 void setTimeout(int timeout);
97
98 bool isVisible() const;
99 void setVisible(bool visible);
100
101 QQuickToolTip *toolTip() const;
102
105 void delayChanged();
106 void timeoutChanged();
107 void visibleChanged();
108
109public Q_SLOTS:
110 void show(const QString &text, int ms = -1);
111 void hide();
112
113private:
114 Q_DISABLE_COPY(QQuickToolTipAttached)
115 Q_DECLARE_PRIVATE(QQuickToolTipAttached)
116};
117
119
120#endif // QQUICKTOOLTIP_P_H
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qobject.h:103
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Provides tool tips for any control.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qcoreevent.h:366
QString text
void textChanged(const QString &newText)
Combined button and popup list for selecting options.
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SLOTS
#define Q_SIGNALS
#define explicit
view show()
[18] //! [19]
edit hide()
edit isVisible()
insertRed setText("insert red text")