[Qt-qml] QML without GUI?

Jason H scorp1us at yahoo.com
Thu Dec 1 23:04:12 CET 2011


Thanks. I actually want to put out HTML an other structured formats instead. Any clue how I could evaluate the object tree and get output?
Trivial Example:
Table {
Row {
    bgcolor: "lightgray"

    Cell { id:"c00"; text: "11" }
    Cell {id:"c01"; text: "12" }
    Cell { id:"c02"; text: "13" }
}

Row {
    bgcolor: "lightblue"

    Cell { id:"c10"; text: "21" }
    Cell { id:"c11"; text: "22" }
    Cell { id:"c12"; text: "23" }
}
}
<TABLE><TR bgcolor="lightgray"><TD>11</TD>...</TR></TABLE>

It looks rather silly, but only until you realize you have components, and can assemble your output with those.





________________________________
 From: Alan Alpert <alan.alpert at nokia.com>
To: qt-qml at qt.nokia.com 
Cc: ext Jason H <scorp1us at yahoo.com> 
Sent: Thursday, December 1, 2011 4:38 PM
Subject: Re: [Qt-qml] QML without GUI?
 
On Thu, 1 Dec 2011 19:45:57 ext Jason H wrote:
> Is it possible to repurpose QML for non-gui, specifically text  stream
> output?
> 
> Here's what I'm thinking... Have it render HTML. Or even.better yet, take
> the Wt approach so QML can be, used for web  interfaces!
> 
> Is this possible?

Do you mean usinq QML for actually non-gui tasks? Then just don't import the 
QtQuick GUI primitives. Just use built in elements, like Component, and your 
own imports.

Or do you mean rendering to something other than pixels on the screen? Then 
you want a custom lighthouse plugin. 
http://blog.forwardbias.in/2011/07/qtcaca-lighthouse-plugin.html talks about 
one that renders to text using cacalib. You could probably do one that outputs 
colored divs instead.

-- 
Alan Alpert
Senior Engineer
Nokia, Qt Development Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20111201/971d8edc/attachment-0001.html 


More information about the Qt-qml mailing list