# Can I write an rqt plugin with QML?

Hi,

I'm interested in writing a virtual gauge plugin for rqt. It seems the easiest way to do this would be the "Circular Gauge" QML type. And I have seen that @Boris wrote a ROS interface for QML. But, I haven't seen anybody use QML for an rqt plugin yet. Is that possible?

edit retag close merge delete

Sort by » oldest newest most voted

It looks like ros_qml is a python script that loads QML as python QT application: https://github.com/bgromov/ros_qml/bl... , so it might be possible to adapt that to run inside of an rqt plugin instead of as a standalone application.

I'm not sure what else rqt_qml is doing during the setup (the setup documentation refers to running scripts that don't exist, which makes it hard to follow), but it looks like there may be some quirks that are required to get the ros_qml plugins available within QML.

The dependency on Qt 5.4 is also much newer than the default version of QT that is used by most versions of ROS. (Versions before Kinetic used QT 4.x , and Kinetic uses QT 5.3: http://www.ros.org/reps/rep-0003.html ). It's not possible to use multiple versions of QT in the same application, so you'll want to make sure that QML is compatible with the version of QT that's used by rqt before you start experimenting too much.

more

1

@ahendrix Which missing scripts are you referring to? To me everything seems in place. Anyway, the shell scripts are only used to set up correct development environment. The python init script is basically doing the same: it inserts appropriate paths to QT environment.

( 2016-11-26 06:39:02 -0500 )edit

The first section of the directions refer to a configure.py, but there's no configure.py in ros_qml.

( 2016-11-26 16:10:26 -0500 )edit
1

Right, but that refers to PyQt installation, not ros_qml. Namely, the line before shell snippet reads To install PyQt with Python 2.7 bindings configure and build it with the following parameters (actual paths may differ).

( 2016-11-26 16:42:13 -0500 )edit