Open
Description
The main difference is that a gadget doesn't derive from a QObject and doesn't have any signals or slots
https://doc.qt.io/qt-6/qobject.html#Q_GADGET
Areas that would need API / changes
-
cxx_qt::qobject
we would need acxx_qt::qgadget
macro too - Inside the struct when there are
qproperty
there should be noNOTIFY
- There should be no
cxx_qt::qsignals(T)
whereT
is a gadget - What should happen to the
qobject::T
naming for both the "C++" context and theimpl qobject::T
? should we have aqgadget::T
? or instead change things to something more generic likeqt::T
orcpp::T
orcxx_qt::T
? - What happens with the threading ? We use
QMetaObject::invokeMethod(QObject* ptr, ... )
so this would need to be disabled ? - We need to change our QObject assert to ensure it does not derive from a QObject ?
- Should you be able to still define custom base classes?
- Consider support for Q_GADGET-only features (e.g.
QML_VALUE_TYPE
)
Metadata
Metadata
Assignees
Type
Projects
Status
Todo