rqt on ROS2 - cannot export perspective - 'QtCore' is not defined
I've launched rqt and I'm getting the following error when I'm trying to save the current layout to a perspective file:
Traceback (most recent call last):
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 188, in save_settings_completed
callback(*callback_args)
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 399, in _on_export_perspective_continued
self._convert_values(data, self._export_value)
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
self._convert_values(groups[group], convert_function)
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 420, in _convert_values
keys[key] = convert_function(keys[key])
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 460, in _export_value
reimported = self._import_value(data)
File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 429, in _import_value
return QByteArray.fromHex(eval(value['repr(QByteArray.hex)']))
File "<string>", line 1, in <module>
NameError: name 'QtCore' is not defined
I 'm using rqt on ROS 2. The same procedure is successful when launching the ROS 1 equivalent. Any pointers?
Re-importing QtCore as follows solves it, but sounds more of a hack to me than an actual solution:
import python_qt_binding.QtCore as QtCore