-
Notifications
You must be signed in to change notification settings - Fork 82
Need to be able to choose the parent when deriving from different bases #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could this be fixed by specifying our own constructor API 🤔 : #339 Would be a more general solution to the problem, right? |
Potentially 🤔 So we then might have to get the following things into the same constructor feature
|
We could make |
Or do we use an attribute? As this appears to be supported by Syn in fn construct(#[default = "nullptr"] parent: *mut QQuickItem) |
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
I've created an experiment in #513 of using the attribute route for the |
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
Closing this in favor of #550 |
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes KDAB#474
This then allows you to create a QQuickItem such as a QQuickPaintedItem. Closes #474
Currently we assume that it'll be
QObject* parent = nullptr
, but for some Qt types (eg QQuickPaintedItem or QQuickItem) the parent is different.We need to have a way in the
cxx_qt::qobject
macro to be able to specify a different parent other thanQObject
.There seems to be these options
#[cxx_qt::qobject(base = "QQuickPaintedItem", parent = "QQuickItem"]
#[cxx_qt::qobject(base = "QQuickPaintedItem", parent_ptr = "QQuickItem"]
or#[cxx_qt::qobject(base = "QQuickPaintedItem", parent = "QQuickItem*", parent_default = "nullptr"]
QObject
, eg have#[cxx_qt::qquickitem(base = "QQuickPaintedItem")]
this then means that we can generate the different asserts and parent etc and it's clear to the developer which base the type is deriving fromThe text was updated successfully, but these errors were encountered: