On 21/11/2016 07:27, Michael Zanetti wrote:
>
> On 18.11.2016 21:09, Daniel d'Andrada wrote:
>> On 18/11/2016 12:29, Michael Zanetti wrote:
>>>> + qRegisterMetaType<Window*>("Window*");
>>> think it would make sense to qmlRegisterUncreatableType<Window>(...) too? Seems it would be useful API to be able to access Window from QML
>>>
>> Not sure. qmlRegisterUncreatableType() documentation says: "This is
>> useful where the type is only intended for providing attached properties
>> or enum values."
>> Not the case here.
> I'm more thinking about being able to access the Window type in QML
> altogether. Not really about providing attached properties etc, but it
> could make sense to do pass the Window object to somewhere in QML and
> access its property there without having access to the model.
>
>
This already happens in Stage.qml:
On 21/11/2016 07:27, Michael Zanetti wrote: pe<Window* >("Window* "); eatableType< Window> (...) too? Seems it would be useful API to be able to access Window from QML eatableType( ) documentation says: "This is
>
> On 18.11.2016 21:09, Daniel d'Andrada wrote:
>> On 18/11/2016 12:29, Michael Zanetti wrote:
>>>> + qRegisterMetaTy
>>> think it would make sense to qmlRegisterUncr
>>>
>> Not sure. qmlRegisterUncr
>> useful where the type is only intended for providing attached properties
>> or enum values."
>> Not the case here.
> I'm more thinking about being able to access the Window type in QML
> altogether. Not really about providing attached properties etc, but it
> could make sense to do pass the Window object to somewhere in QML and
> access its property there without having access to the model.
>
>
This already happens in Stage.qml:
""" position. x - decoratedWindow .contentX position. y - decoratedWindow .contentY
x: model.window.
y: model.window.
"""
Looks like qmlRegisterUncr eatableType( ) is not needed for that. If think
you only need it for Window.foo type of constructs.