I am curious what operating system you have. I have been trying to install PyQt4 on my Windows Vista machine and it seems to fail.
I downloaded PyQt-Py2.5-gpl-4.4.2-1.exe which is the Windows binary installer. It is supposed to contain everything needed for PyQt development except for Python itself:
PyQt
Qt (with database support for SQLite3 and ODBC)
Qt Designer
Qt Linguist
Qt Assistant
pyuic4
pylupdate4
lrelease
pyrcc4
QScintilla
However after the installation I get the notorious:
"ImportError: No module named PyQt4"
even though there is a PyQT4 folder and a bin subfolder with all the needed dll files in my Python Lib folder.
A shame, because PyQT sounds like and interesting GUI toolkit. Let me know what you did to make it work on your computer. If I get it to go, I can help you too.
More details, I downloaded:
http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py2.5-gpl-4.4.2-1.exe
Ene Uran
Posting Virtuoso
1,723 posts since Aug 2005
Reputation Points: 625
Solved Threads: 213
Looks like Windows Vista screws you up. The above PyQt-Py2.5-gpl-4.4.2-1.exe installed perfectly fine on my Windows XP machine. I tested dangermini's pyqt code and it works without a hitch. Not quite sure why he has a problem?
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
I am curious what operating system you have. I have been trying to install PyQt4 on my Windows Vista machine and it seems to fail.
I downloaded PyQt-Py2.5-gpl-4.4.2-1.exe which is the Windows binary installer. It is supposed to contain everything needed for PyQt development except for Python itself:
PyQt
Qt (with database support for SQLite3 and ODBC)
Qt Designer
Qt Linguist
Qt Assistant
pyuic4
pylupdate4
lrelease
pyrcc4
QScintilla
However after the installation I get the notorious:
"ImportError: No module named PyQt4"
even though there is a PyQT4 folder and a bin subfolder with all the needed dll files in my Python Lib folder.
A shame, because PyQT sounds like and interesting GUI toolkit. Let me know what you did to make it work on your computer. If I get it to go, I can help you too.
More details, I downloaded:
http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py2.5-gpl-4.4.2-1.exe
Don't ask me how I did it, but I got it to go on my Windows Vista machine. I started with the premise that the MS mindset is magnanimously screwed up. So here is the solution:
The PyQT installation works on Windows Vista if you add the file qt.conf found in C:\Python25 after the installation to (oh my God, what are those MS folks thinking?):
C:\Users\User_Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\PyQt GPL v4.4.2 for Python v2.5
You have to use your own User_Name!
Ene Uran
Posting Virtuoso
1,723 posts since Aug 2005
Reputation Points: 625
Solved Threads: 213
Sorry for the late post. I just noticed this. Your button line should read
self.connect(button, SIGNAL("clicked()"), self, SLOT("close()"))
I'm thinking of doing a PyQt tutorial, or at least a list to links on using PyQt(4), thread on DaniWeb. Do you have any links that might be of interest?
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714