My application will allow a user to control some hardware (for example
some motors).  I have some code written in python that handles the
comms and other aspects of hardware control, and there's a well
defined interface for controlling them and reading back the status
etc.  I've also now got a QML interface for displaying status screens
and allowing a user to move the motors.

What I need is some way of joining the 2 things up, so that the
current motor status is displayed in the UI, and when buttons are
pressed these events are sent through to the hardware control.

I was under the impression that something like PySide is a python
wrapper for the Qt modules and would allow me to create a
QDeclarativeView for presenting the UI, and then some signals and
slots for connecting things up.  Perhaps I'm going about this the
wrong way?

Rob

On 14 September 2010 17:58, Jason H <scorp...@yahoo.com> wrote:
> I don't think there are any implementations of a python declarative engine. 
> Even
> so, it would only be wrapped. PyQt won't do it  until 4.7 is released, but it
> should appear in the snapshots days after.
>
> With the models and source, what does the back-end implementation matter? it
> should me XML/images/video.etc/ served by a webserver.
>
>
>
>
>
>
> ----- Original Message ----
> From: Robert Garrett <rob.garr...@blacktrace.com>
> To: Qt-qml@trolltech.com
> Sent: Tue, September 14, 2010 12:40:13 PM
> Subject: [Qt-qml] Python and QML
>
> Hi all,
> I'm not sure if this is the correct place for my query, but if not
> hopefully someone could point me to the right place.
>
> I'm building an embedded application using QML for the front-end and
> python for the back-end.  I'm not sure how to join these bits
> together, though.
>
> Can anyone give me some examples/demonstration code for hooking this
> into Python?  I've seen the PySide project, which looks to do what I
> need, but I'm new to Qt and the docs at PySide don't have much
> information on the QtDeclarative side of things.
>
> At the moment something very simple would be helpful - a python script
> that creates the window using a qml file and then some python code to
> update a text box in the interface.  And a button in the interface
> that causes a function in the python code to be run.  I'm sure this
> should be a simple signal/slot thing, but I've struggled to get the
> syntax working.  From there I should be able to figure most of what I
> need.
>
> Thanks,
> Rob
> _______________________________________________
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
>
>
>
>



-- 
Robert Garrett
Software Engineer
The Blacktrace Group
The Dolomite Centre Ltd,
Unit 1, Anglian Business Park,
Royston, SG8 5TW, UK


Phone: +44 1763 242491
Fax: +44 1763 246125



************************************************************
This message is intended only for the use of the individual or entity
to whom it is addressed. It may contain confidential or legally
privileged information. If you are not the intended recipient you are
hereby notified that any disclosure, copying, distribution of this
information is strictly prohibited and may be unlawful. If you have
received this communication in error, please notify us immediately by
responding to this email and then delete it from your system. Dolomite
is neither liable for the proper and complete transmission of the
information contained in this communication nor for any delay in its
receipt.

_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to