rpg_svo icon indicating copy to clipboard operation
rpg_svo copied to clipboard

ImportError: cannot import name QWidget

Open gethubwy opened this issue 5 years ago • 2 comments

when I run the cmd: rosrun rqt_svo rqt_svo,then met the problem: image then I use the cmd: rm ~/.config/ros.org/rqt_gui.ini and the qusetion is still existence。

I have install libqt4-dev,qt4-qmake , and with ubuntu 16.04, ROS kinetic。 Someone says it should install Qt 5 on my computer, but I found that Ubuntu 16.04 LTS uses an independent system for controlling the Qt version, and it is QT4.

I do not know how to solve it. Please help me, thanks a lot.

gethubwy avatar Jul 15 '19 12:07 gethubwy

@gethubwy go to ws/src/rpg_svo/rqt_svo/src/rqt_svo/svo_widget.py and replace: #from python_qt_binding.QtGui import QWidget # <= old line commented out from python_qt_binding.QtWidgets import QWidget # <= new line added

Unlingius avatar Aug 13 '19 10:08 Unlingius

@Unlingius is right. rqt in Kinetic uses Qt 5 and in Qt 5 the Widget class is defined in QtWidgets rather then QtGui.

CrisGao avatar Dec 21 '19 01:12 CrisGao