[Qt-interest] Some questions about QML

Jabot Corentin corentin.jabot at gmail.com
Wed Nov 4 09:17:25 CET 2009


Hi. Thanks for your answer.

I'm happy to learn performance will be improved :)

About the 30 properties limit, that is on the QmlContext doc generated from
the repository checkout this week :

> Each context may have up to 32 default objects, and objects added first
> take precedence over those added later. All properties added explicitly by
> QmlContext::setContextProperty<http://plateforme.ankama.lan/doc/qt-kinetic/html/qmlcontext.html#setContextProperty>()
> take precedence over default object properties.


And I see nothing about expose a whole object. The doc seems to explain that
expose an object only expose the object properties

> To simplify binding and maintaining larger data sets, QObject<http://plateforme.ankama.lan/doc/qt-kinetic/html/qobject.html>'s
> can be added to a QmlContext. These objects are known as the context's
> default objects. In this case all the properties of the QObject<http://plateforme.ankama.lan/doc/qt-kinetic/html/qobject.html>are made available by name in the context, as though they were all
> individually added by calling QmlContext::setContextProperty<http://plateforme.ankama.lan/doc/qt-kinetic/html/qmlcontext.html#setContextProperty>().
>
>

Perhaps it could be great if the a method like the
QScriptEngine::globalObject().setProperty() could be use to interact with
the javascript section of QML


And I didn't find any thing about signal/slot communication between C++ and
qml in the documentation.

Thanks for your enlightenment,

Corentin Jabot.


2009/11/4 Bill King <bill.king at nokia.com>

> On behalf of the QML team lead.
>
> > -------- Original Message --------
> > Subject:        [Qt-interest] Some questions about QML
> > Date:   Sun, 1 Nov 2009 13:33:01 +0100
> > From:   ext Jabot Corentin
> > <corentin.jabot at gmail.com><mailto:corentin.jabot at gmail.com> To:
> > qt-interest at trolltech.com<mailto:qt-interest at trolltech.com>
> > <qt-interest at trolltech.com><mailto:qt-interest at trolltech.com>
> >
> >
> > Hi guys.
> >
> > I built my first QML application yesterday, using the git sources
> > repository. Inside a transparent widow, I put a transparent QMlView in
> > which I load a simple qml file In order to reproduce an UI that I have
> > already done with standard Qt widgets. I compare the to applications. The
> > one with the standards widget takes 1 Mo RAM and the one with the QMlView
> > and the qml file 16Mo... does that is normal or going to be fixed ?
>
> This will be improved.  The greatest saving we will make is by improved
> pixmap
> caching.
>
> 16MB is higher then we've seen ourselves.  Most of our examples use less
> than
> 12MB.
>
> > Second point, will the c++/qml communication will be improved ?
> >
> > It's seems there is no other way than properties to communicate between
> c++
> > and qml and the doc said the properties are limited to 30 by context,
> that
> > is quite few. My purpose is to build UI with QML and treatment with c++
> > native code. It will be great if we could expose whole object to qml as
> we
> > can for the ecma scripts and use the signals/slots !
>
> There is no 30 property limit.  Can you tell us where you read that?
>
> You can expose the whole object to QML, including all signals, slots, and
> properties.  See QmlContext::setContextProperty()
>
> > My last question is about network and security. Can we disable network
> > download from web site (except predefined trusted domains for example ?)
>
> QmlEngine::setNetworkAccessManager() allows you to provide your own access
> manager.
>
> > The declarative UI is really great, I love it And hope It will be
> released
> > soon. By the way, Is there any approximated date for Qt 4.7 and qml ?
>
> There will be a release that works with Qt 4.6.  I cannot provide a release
> date for 4.7 at this stage.
>
> --
> Martin.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091104/63bfb9fb/attachment.html 


More information about the Qt-interest-old mailing list