Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name QWidget #252

Open
gethubwy opened this issue Jul 15, 2019 · 2 comments
Open

ImportError: cannot import name QWidget #252

gethubwy opened this issue Jul 15, 2019 · 2 comments

Comments

@gethubwy
Copy link

gethubwy commented Jul 15, 2019

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.

@Unlingius
Copy link

@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

@CrisGao
Copy link

CrisGao commented Dec 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants