[Qt-interest] QtScript Webserver?

Stephen Kelly steveire at gmail.com
Fri Dec 3 20:34:27 CET 2010


Jason H wrote:

> Has anyone made a Qt-script-enabled web server?
> 
> Something where I can write Qt/JS code to generate simple web pages, and
> maybe serialize Qt objects (lists,etc) between a Qt client and the server?

Your description is not very clear on what you want to do, but if you're 
trying to generate HTML (or any kind of structured markup) with a context of 
Qt objects, have a look at Grantlee

You write templates that look like this:

http://grantlee.org/apidox/for_themers.html 
(the page is badly named - it should be for template writers I guess)

and you create a Context of and objects that fit into a QVariant, even if 
they don't inherit QObject and use QProperties.

http://grantlee.org/apidox/for_app_dev.html

The syntax is extensible with QtScript or C++ plugins, but I'm just starting 
to repeat the documentation now, so have a read and ask more if it is what 
you're looking for.

All the best,

Steve.




More information about the Qt-interest-old mailing list