On 10/8/2010 10:10 PM, Nathan Weston wrote:
On 10/8/2010 3:47 PM, Raoul Snyman wrote:
On 8 October 2010 18:40, Nathan Weston<[email protected]> wrote:
My program looks like this:
# qthello.py
import sys
import sip
import PyQt4.QtCore
import PyQt4.QtGui

app = PyQt4.QtGui.QApplication(sys.argv)
window = PyQt4.QtGui.QMainWindow()
window.setCentralWidget(PyQt4.QtGui.QLabel("Hello"))
window.show()
sys.exit(app.exec_())
# end of qthello.py

Your application is incorrect. You have to import PyQt4 like so:

from PyQt4 import QtCore, QtGui

Thanks, that fixes the problem. But it seems like a stretch to call the
program "incorrect" when it works just fine. Why does PyInstaller
understand one form of import but not the other?

No reason, actually, sounds like a bug (though it's hard to believe since it's a pretty common form of imports). I'll have a look.
--
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to