How to get code completion for PyQt using Pydev
- Go to "Window" -> "Preferences..." -> "Pydev" -> "Interpreter - Python"
- In the "Forced builtin libs" section, click "New..."
- Type in "PyQt4" and click "OK".
- Click "OK" to close the Preferences window.
Related posts
- PyQt: How to pass arguments while emitting a signal — posted 2008-01-29
- PyQt4 QItemDelegate example with QListView and QAbstractListModel — posted 2008-01-23
- How to install pyqt4 on ubuntu linux — posted 2008-01-15
- Python PyQt Tab Completion example — posted 2008-01-04
- How to capture the Tab key press event with PyQt 4.3 — posted 2008-01-03
- PyQt 4.3 Simple QAbstractListModel/ QlistView example — posted 2008-01-03
Comments
Code completion now works fine for me, except for some classes. For example:
if I write: from PyQt4 import
it only shows me two class available: QtCore and QtGui, for example I cannot see QtNetwork, but if I write it by hand, my code execute it without problems.
Any suggestion about this problem?
Thanks for writing this.
nice one
For some reason, this still doesn't work for me. I'm using the eclipse that comes with Python(x,y) but I don't think that should make a difference. I've tried adding PyQt4 to both the PYTHONPATH and the Forced Builtin libs and nothing works. Also tried reinstalling PyQt4 without any success.
Thanks
I've had the same problem as Saatvik. I ran Eclipse from the command line, however, and noticed that it was throwing a ClassCastException when trying to do the completion, trying to cast a SystemASTManager to an ASTManager. I'm going to post the bug at Pydev shortly.
Works like a charm, thank you :) I was thinking of using eric4, but now I think I'll stick to Eclipse, the troll at Eric's splashscreen scares the hell out of me.
This works for auto-completion, but I cannot seem to get any call tip for function arguments? Does anyone have this working?
Thanks for this. It wasn't quite that simple... I had to enumerate every single PyQt4 import, but that beats having 200+ errors in a very simple project. And there's code completion!
i solve this problem just do next :
# Solved By Al Banna Techno
from PyQt4.QtGui import *
from PyQt4.Qt import *
import sys
run=False
#we tricking on program to not making an error
if run==True:
from PyQt4.Qt.__init__ import *
from PyQt4.QtGui.__init__ import *
from PyQt4.__init__ import *
disqus:2798331066