[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Communication between C++ and QML
From: Espen =?ISO-8859-1?Q?Sand=F8y?= Hustad <espen () ehustad ! com>
Date: 2011-06-05 15:16:07
Message-ID: 1761024.fnlzXS4FQd () suspended
[Download RAW message or body]
On Friday 3. June 2011 23.12.03 Stefan Majewsky wrote:
Hi
> Hi,
>
> snip
>
> Now as far as I understand the (IMHO surprisingly sparse)
I didn't find the documentation sparse, but quite good. Have you
looked at http://doc.qt.nokia.com/4.7/qtquick.html for instance?
> QtDeclarative module documentation, the main gateway for transferring
> information between C++ and QML is
> declarativeView->engine()->rootContext()->setContextObject(). QML
> retrieves data from the properties of this object and the subobjects
> which it references, and invokes via JavaScript functions in this
> object to propagate user input to the C++ layer.
>
> Is this correct? If so, I get a feeling that it would require a
> potentially epic amount of boilerplate to make my already
> interface-agnostic data available to QML. Can I do anything to make
> this task simpler?
Have a look at http://doc.qt.nokia.com/4.7/qtbinding.html (
Specifically the part about defining new QML elements.), and
http://doc.qt.nokia.com/4.7/qdeclarativeitem.html
I haven't looked at the code in KNetwalk, but is what you want to do possible
by making AbstractGrid a subclass of QDeclarativeItem, and then creating an
AbstractGrid object directly from QML?
HTH
Espen Hustad
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic