ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess python_qt_binding is not handling these types very well since they are treated special in the bindings. I am not sure if that is easily fixable in python_qt_binding but I have filled a ticket for that: https://github.com/ros-visualization/python_qt_binding/issues/8

For your specific case I would suggest to just use plain Python string and Python list of strings. That should work seemless with the QStringListModel API. And in Python 3.x the types QString / QStringList will go away anyway. So it would make your code also more future proof.

I guess python_qt_binding python_qt_binding is not handling these types very well since they are treated special in the bindings. I am not sure if that is easily fixable in python_qt_binding python_qt_binding but I have filled a ticket for that: https://github.com/ros-visualization/python_qt_binding/issues/8

For your specific case I would suggest to just use plain Python string strings and Python list lists of strings. That should work seemless with the QStringListModel QStringListModel API. And in Python 3.x the types QString QString / QStringList QStringList will go away anyway. So it would make your code also more future proof.