[PyQt] PyQt4 problem: QApplication() has an invalid type
Ala Al-Shaibani
ala.alshaibani at gmail.com
Wed Jun 17 13:38:42 BST 2009
Hello everyone.
I am using Python 2.5.1 (default python for OS X) on macintosh.
I installed few libraries, including the scipy library (scipy, numpy,
matplotlib and ipython).
I then installed Qt, SIP and PyQt (latest versions of each).
My problem is with this code:
import sys
from PyQt4 import QtGui
app = QtGui.QApplication(sys.argv)
For which I receive the error: TypeError: argument 1 of
PyQt4.QtGui.QApplication() has an invalid type
Here are few tests that I did:
print sys.argv: test.py
type(sys.argv): <type 'list'>
Also, replacing ..... app = QtGui.QApplication(sys.argv)..... with
.....app = QtGui.QApplication([]).... results with the same error.
Would appreciate any help, thanks.
More information about the PyQt
mailing list