On Sat, 26 May 2018 12:05:38 +0000, Simon Hausmann wrote:

> P.S.: Are you sure the stops: [ ... ] assignment works?

You are right: I forgot to mention this extra piece of code: 

    QMetaType::registerConverter< QJSValue, QskGradientStop >(

        [] (const QJSValue& value) -> QskGradientStop
        {
            return
            {
                value.property( QLatin1String("position") ).toNumber(),
                value.property( QLatin1String("color") ).toVariant
().value< QColor >()
            };
        }
    );

It can be found in https://github.com/uwerat/qskinny/blob/master/src/
common/QskModule.cpp.

Most of the tricks for exposing stuff to QML have been written by Andrew 
( Knight ) who is way more familiar with the QML world than I am.

In the beginning we were not sure if we will be able to come up with a 
framework, that allows us to get rid of QML in general. That's why we 
played with ways how to expose our APIs to QML without creating the same 
overhead you find in the existing classes.

Today the QML API is not in the focus of the application driving the 
development of QSkinny. But from the initial proof of concept it is 
pretty clear that I can expose - let's say 80-90 % of the API - to QML 
easily.

But a Qt/Quick application is always a combination of QML and C++ and I 
don't see why it is necessary trying to do as much as possible in the QML 
part.

Uwe

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to