[Qt-qml] "QML supports network transparency by using URLs"

Gregory Schlomoff gregory.schlomoff at gmail.com
Mon Jul 12 03:01:21 CEST 2010


Hello everybody,

Just a small comment: last week, we built our first QML component in
C++, and it was way more easier than we would have thought.

All of a sudden, we discovered that extending QML from C++ either by
subclassing existing items or by creating new ones from scratch was
*really* easy, and that for all the things that we are missing in the
official QML API, we could built it ourselves (like changing the mouse
cursor shape, or adding support for drag and drop functionnality - two
points that I previously asked this mailing-list about).

I'm telling this story because I realiized that although the docs are
great from a technical point of view (everything is clear and easy to
understand), maybe the examples could have better choosen to
illustrate more real-life cases. I'm thinking of the Person and the
Musician examples here. They are easy to understand, but when you see
them, you don't think: "I could use this to create a subclass of the
Text component that would allow me to specify text by an URL."

That's my 2 cents to the doc team. And Jason, if you're at least
somewhat comfortable with C++, you may want to try implement your
suggestio, it's really easier than it sounds.

Kind regards,

Greg

On Sun, Jul 11, 2010 at 11:55 AM, Jason H <scorp1us at yahoo.com> wrote:
> Text {
>  source: "http://iscaliforniaonfire.com"
> }
>
> Does not work.
> Before you tell me to use a model, let me point this out. I was trying to make a
> crawler/ticker, like on the news stations.
> When I tried to use a model, they were uniformly spaced, and that's not
> acceptable.
>
>
> It would be cool if I could specify source for any string, that could ever be
> used (performance implications are left to the coder) as well as specify a XPath
> query It might be cool also specify an XPath query too, sot that
>
> Text {
>  source: "http://iscaliforniaonfire.com"
>  sourceQuery: "/body/H1/text()"
> }
>
> It may be good to make a Document element type:
> Document {
>     id: californiaFireStatus
>     source: "http://iscaliforniaonfire.com"
>     query{
>         id:yesno; query: "/body/H1/text()"
>     }
>     query{
>         id:title; query: "/head/title"
>     }
>
> }
>
> Text {
>        source: californiaFireStatus.yesno
>
> }
>
> Or something like that. I think my only option now is to fetch it into a model
> and then glue it together?
>
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>




More information about the Qt-qml mailing list