Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qobject.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QOBJECT_H
6#define QOBJECT_H
7
8#ifndef QT_NO_QOBJECT
9
10#include <QtCore/qobjectdefs.h>
11#include <QtCore/qstring.h>
12#include <QtCore/qbytearray.h>
13#include <QtCore/qlist.h>
14#ifdef QT_INCLUDE_COMPAT
15#include <QtCore/qcoreevent.h>
16#endif
17#include <QtCore/qscopedpointer.h>
18#include <QtCore/qmetatype.h>
19
20#include <QtCore/qobject_impl.h>
21#include <QtCore/qbindingstorage.h>
22
23#include <chrono>
24
26
27
28template <typename T> class QBindable;
29class QEvent;
30class QTimerEvent;
31class QChildEvent;
32struct QMetaObject;
33class QVariant;
34class QObjectPrivate;
35class QObject;
36class QThread;
37class QWidget;
38class QAccessibleWidget;
39#if QT_CONFIG(regularexpression)
41#endif
43
45
46Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QString &name,
47 const QMetaObject &mo, QList<void *> *list, Qt::FindChildOptions options);
48Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QMetaObject &mo,
49 QList<void *> *list, Qt::FindChildOptions options);
50Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re,
51 const QMetaObject &mo, QList<void *> *list, Qt::FindChildOptions options);
52Q_CORE_EXPORT QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options);
53
54class Q_CORE_EXPORT QObjectData
55{
56 Q_DISABLE_COPY(QObjectData)
57public:
58 QObjectData() = default;
59 virtual ~QObjectData() = 0;
63
70 uint isWindow : 1; // for QWindow
73 uint willBeWidget : 1; // for handling widget-specific bits in QObject's ctor
74 uint wasWidget : 1; // for properly cleaning up in QObject's dtor
79
80 // ### Qt7: Make this return a const QMetaObject *. You should not mess with
81 // the metaobjects of existing objects.
82 QMetaObject *dynamicMetaObject() const;
83
84#ifdef QT_DEBUG
85 enum { CheckForParentChildLoopsWarnDepth = 4096 };
86#endif
87};
88
89class Q_CORE_EXPORT QObject
90{
92
93 Q_PROPERTY(QString objectName READ objectName WRITE setObjectName NOTIFY objectNameChanged
94 BINDABLE bindableObjectName)
95 Q_DECLARE_PRIVATE(QObject)
96
97public:
98 Q_INVOKABLE explicit QObject(QObject *parent = nullptr);
99 virtual ~QObject();
100
101 virtual bool event(QEvent *event);
102 virtual bool eventFilter(QObject *watched, QEvent *event);
103
104#if defined(QT_NO_TRANSLATION) || defined(Q_QDOC)
105 static QString tr(const char *sourceText, const char * = nullptr, int = -1)
106 { return QString::fromUtf8(sourceText); }
107#endif // QT_NO_TRANSLATION
108
109 QString objectName() const;
110#if QT_CORE_REMOVED_SINCE(6, 4)
111 void setObjectName(const QString &name);
112#endif
114 void setObjectName(const QString &name) { doSetObjectName(name); }
116 QBindable<QString> bindableObjectName();
117
118 inline bool isWidgetType() const { return d_ptr->isWidget; }
119 inline bool isWindowType() const { return d_ptr->isWindow; }
120 inline bool isQuickItemType() const { return d_ptr->isQuickItem; }
121
122 inline bool signalsBlocked() const noexcept { return d_ptr->blockSig; }
123 bool blockSignals(bool b) noexcept;
124
125 QThread *thread() const;
126 void moveToThread(QThread *thread);
127
128 int startTimer(int interval, Qt::TimerType timerType = Qt::CoarseTimer);
129 int startTimer(std::chrono::milliseconds time, Qt::TimerType timerType = Qt::CoarseTimer);
130 void killTimer(int id);
131
132 template<typename T>
133 inline T findChild(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
134 {
135 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
136 return static_cast<T>(qt_qFindChild_helper(this, aName, ObjType::staticMetaObject, options));
137 }
138
139 template<typename T>
140 inline QList<T> findChildren(const QString &aName, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
141 {
142 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
144 qt_qFindChildren_helper(this, aName, ObjType::staticMetaObject,
145 reinterpret_cast<QList<void *> *>(&list), options);
146 return list;
147 }
148
149 template<typename T>
150 QList<T> findChildren(Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
151 {
152 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
154 qt_qFindChildren_helper(this, ObjType::staticMetaObject,
155 reinterpret_cast<QList<void *> *>(&list), options);
156 return list;
157 }
158
159#if QT_CONFIG(regularexpression)
160 template<typename T>
161 inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
162 {
163 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
165 qt_qFindChildren_helper(this, re, ObjType::staticMetaObject,
166 reinterpret_cast<QList<void *> *>(&list), options);
167 return list;
168 }
169#endif // QT_CONFIG(regularexpression)
170
171 inline const QObjectList &children() const { return d_ptr->children; }
172
173 void setParent(QObject *parent);
174 void installEventFilter(QObject *filterObj);
175 void removeEventFilter(QObject *obj);
176
177 static QMetaObject::Connection connect(const QObject *sender, const char *signal,
178 const QObject *receiver, const char *member, Qt::ConnectionType = Qt::AutoConnection);
179
180 static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
181 const QObject *receiver, const QMetaMethod &method,
183
184 inline QMetaObject::Connection connect(const QObject *sender, const char *signal,
185 const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
186
187#ifdef Q_QDOC
188 template<typename PointerToMemberFunction>
189 static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type = Qt::AutoConnection);
190 template<typename PointerToMemberFunction, typename Functor>
191 static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor);
192 template<typename PointerToMemberFunction, typename Functor>
193 static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type = Qt::AutoConnection);
194#else
195 //connect with context
196 template <typename Func1, typename Func2>
197 static inline QMetaObject::Connection
201 {
202 typedef QtPrivate::FunctionPointer<Func1> SignalType;
204
205 if constexpr (SlotType::ArgumentCount != -1) {
207 "Return type of the slot is not compatible with the return type of the signal.");
208 } else {
209 constexpr int FunctorArgumentCount = QtPrivate::ComputeFunctorArgumentCount<std::decay_t<Func2>, typename SignalType::Arguments>::Value;
210 [[maybe_unused]]
211 constexpr int SlotArgumentCount = (FunctorArgumentCount >= 0) ? FunctorArgumentCount : 0;
213
215 "Return type of the slot is not compatible with the return type of the signal.");
216 }
217
219 "No Q_OBJECT in the class with the signal");
220
221 //compilation error if the arguments does not match.
222 static_assert(int(SignalType::ArgumentCount) >= int(SlotType::ArgumentCount),
223 "The slot requires more arguments than the signal provides.");
224
225 const int *types = nullptr;
228
229 void **pSlot = nullptr;
230 if constexpr (std::is_member_function_pointer_v<std::decay_t<Func2>>)
231 pSlot = const_cast<void **>(reinterpret_cast<void *const *>(&slot));
232
233 return connectImpl(sender, reinterpret_cast<void **>(&signal), context, pSlot,
234 QtPrivate::makeCallableObject<Func1>(std::forward<Func2>(slot)),
235 type, types, &SignalType::Object::staticMetaObject);
236 }
237
238#ifndef QT_NO_CONTEXTLESS_CONNECT
239 //connect without context
240 template <typename Func1, typename Func2>
241 static inline QMetaObject::Connection
242 connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 &&slot)
243 {
244 return connect(sender, signal, sender, std::forward<Func2>(slot), Qt::DirectConnection);
245 }
246#endif // QT_NO_CONTEXTLESS_CONNECT
247#endif //Q_QDOC
248
249 static bool disconnect(const QObject *sender, const char *signal,
250 const QObject *receiver, const char *member);
251 static bool disconnect(const QObject *sender, const QMetaMethod &signal,
252 const QObject *receiver, const QMetaMethod &member);
253 inline bool disconnect(const char *signal = nullptr,
254 const QObject *receiver = nullptr, const char *member = nullptr) const
255 { return disconnect(this, signal, receiver, member); }
256 inline bool disconnect(const QObject *receiver, const char *member = nullptr) const
257 { return disconnect(this, nullptr, receiver, member); }
258 static bool disconnect(const QMetaObject::Connection &);
259
260#ifdef Q_QDOC
261 template<typename PointerToMemberFunction>
262 static bool disconnect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method);
263#else
264 template <typename Func1, typename Func2>
265 static inline bool disconnect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
266 const typename QtPrivate::FunctionPointer<Func2>::Object *receiver, Func2 slot)
267 {
268 typedef QtPrivate::FunctionPointer<Func1> SignalType;
269 typedef QtPrivate::FunctionPointer<Func2> SlotType;
270
272 "No Q_OBJECT in the class with the signal");
273
274 //compilation error if the arguments does not match.
276 "Signal and slot arguments are not compatible.");
277
278 return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, reinterpret_cast<void **>(&slot),
279 &SignalType::Object::staticMetaObject);
280 }
281 template <typename Func1>
282 static inline bool disconnect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
283 const QObject *receiver, void **zero)
284 {
285 // This is the overload for when one wish to disconnect a signal from any slot. (slot=nullptr)
286 // Since the function template parameter cannot be deduced from '0', we use a
287 // dummy void ** parameter that must be equal to 0
288 Q_ASSERT(!zero);
289 typedef QtPrivate::FunctionPointer<Func1> SignalType;
290 return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, zero,
291 &SignalType::Object::staticMetaObject);
292 }
293#endif //Q_QDOC
294
295 void dumpObjectTree() const;
296 void dumpObjectInfo() const;
297
298 QT_CORE_INLINE_SINCE(6, 6)
299 bool setProperty(const char *name, const QVariant &value);
300 inline bool setProperty(const char *name, QVariant &&value);
301 QVariant property(const char *name) const;
302 QList<QByteArray> dynamicPropertyNames() const;
303 QBindingStorage *bindingStorage() { return &d_ptr->bindingStorage; }
304 const QBindingStorage *bindingStorage() const { return &d_ptr->bindingStorage; }
305
307 void destroyed(QObject * = nullptr);
308 void objectNameChanged(const QString &objectName, QPrivateSignal);
309
310public:
311 inline QObject *parent() const { return d_ptr->parent; }
312
313 inline bool inherits(const char *classname) const
314 {
315 return const_cast<QObject *>(this)->qt_metacast(classname) != nullptr;
316 }
317
318public Q_SLOTS:
319 void deleteLater();
320
321protected:
322 QObject *sender() const;
323 int senderSignalIndex() const;
324 int receivers(const char *signal) const;
325 bool isSignalConnected(const QMetaMethod &signal) const;
326
327 virtual void timerEvent(QTimerEvent *event);
328 virtual void childEvent(QChildEvent *event);
329 virtual void customEvent(QEvent *event);
330
331 virtual void connectNotify(const QMetaMethod &signal);
332 virtual void disconnectNotify(const QMetaMethod &signal);
333
334protected:
335 QObject(QObjectPrivate &dd, QObject *parent = nullptr);
336
337protected:
339
340 friend struct QMetaObject;
341 friend struct QMetaObjectPrivate;
342 friend class QMetaCallEvent;
343 friend class QApplication;
345 friend class QCoreApplication;
347 friend class QWidget;
348 friend class QAccessibleWidget;
349 friend class QThreadData;
350
351private:
352 void doSetObjectName(const QString &name);
353 bool doSetProperty(const char *name, const QVariant *lvalue, QVariant *rvalue);
354
355 Q_DISABLE_COPY(QObject)
356 Q_PRIVATE_SLOT(d_func(), void _q_reregisterTimers(void *))
357
358private:
359 static QMetaObject::Connection connectImpl(const QObject *sender, void **signal,
360 const QObject *receiver, void **slotPtr,
362 const int *types, const QMetaObject *senderMetaObject);
363
364 static bool disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot,
365 const QMetaObject *senderMetaObject);
366
367};
368
369inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
370 const char *amember, Qt::ConnectionType atype) const
371{ return connect(asender, asignal, this, amember, atype); }
372
373#if QT_CORE_INLINE_IMPL_SINCE(6, 6)
374bool QObject::setProperty(const char *name, const QVariant &value)
375{
376 return doSetProperty(name, &value, nullptr);
377}
378#endif // inline since 6.6
380{
381 return doSetProperty(name, &value, &value);
382}
383
384template <class T>
385inline T qobject_cast(QObject *object)
386{
387 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
389 "qobject_cast requires the type to have a Q_OBJECT macro");
390 return static_cast<T>(ObjType::staticMetaObject.cast(object));
391}
392
393template <class T>
394inline T qobject_cast(const QObject *object)
395{
396 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
398 "qobject_cast requires the type to have a Q_OBJECT macro");
399 return static_cast<T>(ObjType::staticMetaObject.cast(object));
400}
401
402
403template <class T> constexpr const char * qobject_interface_iid() = delete;
404template <class T> inline T *
405qobject_iid_cast(QObject *object, const char *IId = qobject_interface_iid<T *>())
406{
407 return reinterpret_cast<T *>((object ? object->qt_metacast(IId) : nullptr));
408}
409template <class T> inline std::enable_if_t<std::is_const<T>::value, T *>
411{
412 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
413 QObject *o = const_cast<QObject *>(object);
414 return qobject_iid_cast<std::remove_cv_t<T>>(o);
415}
416
417#if defined(Q_QDOC)
418# define Q_DECLARE_INTERFACE(IFace, IId)
419#elif !defined(Q_MOC_RUN)
420# define Q_DECLARE_INTERFACE(IFace, IId) \
421 template <> constexpr const char *qobject_interface_iid<IFace *>() \
422 { return IId; } \
423 template <> inline IFace *qobject_cast<IFace *>(QObject *object) \
424 { return qobject_iid_cast<IFace>(object); } \
425 template <> inline const IFace *qobject_cast<const IFace *>(const QObject *object) \
426 { return qobject_iid_cast<const IFace>(object); }
427#endif // Q_MOC_RUN
428
430{
431 return o->bindingStorage();
432}
434{
435 return o->bindingStorage();
436}
437
438#ifndef QT_NO_DEBUG_STREAM
439Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
440#endif
441
443{
444public:
446 inline explicit QSignalBlocker(QObject *o) noexcept;
448 inline explicit QSignalBlocker(QObject &o) noexcept;
449 inline ~QSignalBlocker();
450
452 inline QSignalBlocker(QSignalBlocker &&other) noexcept;
453 inline QSignalBlocker &operator=(QSignalBlocker &&other) noexcept;
454
455 inline void reblock() noexcept;
456 inline void unblock() noexcept;
457
458private:
459 Q_DISABLE_COPY(QSignalBlocker)
460 QObject *m_o;
461 bool m_blocked;
462 bool m_inhibited;
463};
464
466 : m_o(o),
467 m_blocked(o && o->blockSignals(true)),
468 m_inhibited(false)
469{}
470
472 : m_o(&o),
473 m_blocked(o.blockSignals(true)),
474 m_inhibited(false)
475{}
476
478 : m_o(other.m_o),
479 m_blocked(other.m_blocked),
480 m_inhibited(other.m_inhibited)
481{
482 other.m_o = nullptr;
483}
484
486{
487 if (this != &other) {
488 // if both *this and other block the same object's signals:
489 // unblock *this iff our dtor would unblock, but other's wouldn't
490 if (m_o != other.m_o || (!m_inhibited && other.m_inhibited))
491 unblock();
492 m_o = other.m_o;
493 m_blocked = other.m_blocked;
494 m_inhibited = other.m_inhibited;
495 // disable other:
496 other.m_o = nullptr;
497 }
498 return *this;
499}
500
502{
503 if (m_o && !m_inhibited)
504 m_o->blockSignals(m_blocked);
505}
506
508{
509 if (m_o)
510 m_o->blockSignals(true);
511 m_inhibited = false;
512}
513
515{
516 if (m_o)
517 m_o->blockSignals(m_blocked);
518 m_inhibited = true;
519}
520
521namespace QtPrivate {
522 inline QObject & deref_for_methodcall(QObject &o) { return o; }
523 inline QObject & deref_for_methodcall(QObject *o) { return *o; }
524}
525#define Q_SET_OBJECT_NAME(obj) QT_PREPEND_NAMESPACE(QtPrivate)::deref_for_methodcall(obj).setObjectName(QLatin1StringView(#obj))
526
528
529#endif
530
531#endif // QOBJECT_H
\inmodule QtCore
The QApplication class manages the GUI application's control flow and main settings.
\inmodule QtCore
Definition qatomic.h:112
\inmodule QtCore
Definition qproperty.h:809
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qcoreevent.h:372
\inmodule QtCore
\inmodule QtCore
\inmodule QtCore
Definition qcoreevent.h:45
Definition qlist.h:74
\inmodule QtCore
Definition qmetaobject.h:18
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
QDynamicMetaObjectData * metaObject
Definition qobject.h:77
uint isDeletingChildren
Definition qobject.h:67
uint isWindow
Definition qobject.h:70
uint receiveChildEvents
Definition qobject.h:69
uint wasDeleted
Definition qobject.h:66
QObject * q_ptr
Definition qobject.h:60
uint deleteLaterCalled
Definition qobject.h:71
uint unused
Definition qobject.h:75
uint isQuickItem
Definition qobject.h:72
uint isWidget
Definition qobject.h:64
uint sendChildEvents
Definition qobject.h:68
QAtomicInt postedEvents
Definition qobject.h:76
QObjectList children
Definition qobject.h:62
uint blockSig
Definition qobject.h:65
uint wasWidget
Definition qobject.h:74
uint willBeWidget
Definition qobject.h:73
QObject * parent
Definition qobject.h:61
QBindingStorage bindingStorage
Definition qobject.h:78
QObjectData()=default
\inmodule QtCore
Definition qobject.h:90
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
Definition qobject.h:282
bool disconnect(const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
Definition qobject.h:253
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
Definition qobject.h:198
T findChild(const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
Returns the child of this object that can be cast into type T and that is called name,...
Definition qobject.h:133
const QObjectList & children() const
Returns a list of child objects.
Definition qobject.h:171
bool isWindowType() const
Returns true if the object is a window; otherwise returns false.
Definition qobject.h:119
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2823
QList< T > findChildren(Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qobject.h:150
QList< T > findChildren(const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
Returns all children of this object with the given name that can be cast to type T,...
Definition qobject.h:140
const QBindingStorage * bindingStorage() const
Definition qobject.h:304
bool signalsBlocked() const noexcept
Returns true if signals are blocked; otherwise returns false.
Definition qobject.h:122
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
Definition qobject.h:242
bool isQuickItemType() const
Returns true if the object is a QQuickItem; otherwise returns false.
Definition qobject.h:120
QScopedPointer< QObjectData > d_ptr
Definition qobject.h:338
bool blockSignals(bool b) noexcept
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke...
Definition qobject.cpp:1548
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
Definition qobject.h:114
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
Definition qobject.h:265
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
bool disconnect(const QObject *receiver, const char *member=nullptr) const
Definition qobject.h:256
bool inherits(const char *classname) const
Returns true if this object is an instance of a class that inherits className or a QObject subclass t...
Definition qobject.h:313
void objectNameChanged(const QString &objectName, QPrivateSignal)
This signal is emitted after the object's name has been changed.
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
Definition qobject.h:118
\inmodule QtCore \reentrant
\inmodule QtCore
Exception-safe wrapper around QObject::blockSignals().
Definition qobject.h:443
void unblock() noexcept
Temporarily restores the QObject::signalsBlocked() state to what it was before this QSignalBlocker's ...
Definition qobject.h:514
void reblock() noexcept
Re-blocks signals after a previous unblock().
Definition qobject.h:507
QSignalBlocker & operator=(QSignalBlocker &&other) noexcept
Move-assigns this signal blocker from other.
Definition qobject.h:485
Q_NODISCARD_CTOR QSignalBlocker(QObject *o) noexcept
Constructor.
Definition qobject.h:465
~QSignalBlocker()
Destructor.
Definition qobject.h:501
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5857
\inmodule QtCore
Definition qcoreevent.h:359
\inmodule QtCore
Definition qvariant.h:64
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
object setProperty("down", true)
auto signal
object setObjectName("A new object name")
auto mo
[7]
Combined button and popup list for selecting options.
\macro QT_NAMESPACE
QObject & deref_for_methodcall(QObject &o)
Definition qobject.h:522
TimerType
@ CoarseTimer
@ FindChildrenRecursively
ConnectionType
@ AutoConnection
@ BlockingQueuedConnection
@ QueuedConnection
@ DirectConnection
static void * context
#define Q_NODISCARD_CTOR
#define Q_WEAK_OVERLOAD
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QMetaObject &mo, QList< void * > *list, Qt::FindChildOptions options)
Definition qobject.cpp:2072
QObject * qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options)
Definition qobject.cpp:2121
const QBindingStorage * qGetBindingStorage(const QObject *o)
Definition qobject.h:429
constexpr const char * qobject_interface_iid()=delete
T * qobject_iid_cast(QObject *object, const char *IId=qobject_interface_iid< T * >())
Definition qobject.h:405
QList< QObject * > QObjectList
Definition qobject.h:44
Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QMetaObject &mo, QList< void * > *list, Qt::FindChildOptions options)
Definition qobject.cpp:2072
T qobject_cast(QObject *object)
\variable QObject::staticMetaObject
Definition qobject.h:385
Q_CORE_EXPORT QObject * qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options)
Definition qobject.cpp:2121
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *)
Definition qobject.cpp:4336
GLboolean GLboolean GLboolean b
GLsizei GLenum GLenum * types
GLuint object
[3]
GLenum type
GLuint name
struct _cl_event * event
GLhandleARB obj
[2]
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define zero
#define tr(X)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
unsigned int uint
Definition qtypes.h:29
const char property[13]
Definition qwizard.cpp:101
QList< int > list
[14]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
monitoredObj installEventFilter(filterObj)
[13]
myObject disconnect()
[26]
myObject moveToThread(QApplication::instance() ->thread())
[6]
someQObject blockSignals(wasBlocked)
QSharedPointer< T > other(t)
[5]
file setParent(multiPart)
\inmodule QtCore
static const int * types()
List_Append< List< typenameL::Car >, typenameList_Left< typenameL::Cdr, N-1 >::Value >::Value Value
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent