[Qt-qml] How to spawn N8 Apps from within QML?
Alan Alpert
alan.alpert at nokia.com
Mon Nov 15 05:12:40 CET 2010
On Tue, 9 Nov 2010 06:41:09 ext Niels Mayer wrote:
> On Mon, Nov 8, 2010 at 2:45 AM, <Andrew.Ratcliff at nokia.com> wrote:
> > How would I spawn other Symbian (N8) applications like Messaging,
> > Contacts etc. from within my QML?
>
> I've been wondering about this myself in the context of
> http://ytd-meego.googlecode.com . Rather than linking in all sorts of
> specialized tightly threaded media-handling code, some apps might work
> best by invoking and controlling single-purpose specialized
> command-line progs that execute as a subprocess, e.g. for capturing,
> encoding, playing back of media.
>
> Seems like QtQuick/QML ought to have a "declarative subprocess"
> facility as well. (Or maybe it does and i didn't see it documented
> anywhere?) This would allow launching of subprocesses asynchronously,
> using "declarative" statements to handle changing application state
> based on the subprocess. Subprocess state changes are expressed via
> high-level messages such as: BeforeProcessExit AfterProcessExit,
> OnOutputLine, OnOutputJSON, OnOutputRegexp, etc.
>
> In Unix, such functionality has long been provided by
> http://en.wikipedia.org/wiki/Expect . I think it would be very useful
> to have such functionality available in QtQuick/QML. In a distant
> past, I found it quite easy to write all manner of GUIs for existing
> Unix functionality using an expect-based subprocess facility
> integrated into a dynamic object oriented language:
> http://nielsmayer.com/winterp/examples/subcalc.lsp
> http://nielsmayer.com/winterp/scrnsnaps/subcalc.gif
>
> Niels
> http://nielsmayer.com
This is a good idea, but I think there's one more thing to learn from the UNIX
example. Expect is not part of coreutils, it's its own tool that is focused on
its own goals. I think that such a declarative subprocess functionality would
be great to use in QML, but should be developed as its own QML module (not
part of the 'QtQuick' namespace at least). You can't just expect all possible
functionality to be built in ;) .
We may not yet have as good established methods for bringing these separate
modules together (UNIX has been around for a bit longer) but now's a good time
to start. We've been trying to get a list of additional QML modules going on
the Qt devnet, and if someone writes this module I'd be happy to revisit that
idea and try to ensure that these modules are discoverable for QML users.
--
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks
More information about the Qt-qml
mailing list