Are you using 64-bit Python?
If so, this is likely to be the issue. Unfortunately, you will need to uninstall all the python modules you have and reinstall them on a 32-bit version of Python. Some modules such as Pygame and PyQt4 do not yet have support for 64-bit Python.
I am running 64-bit Windows 7 Home Premium with Python 2.6.4, and since I did this for pyGame, I have had no further issues.
SgtMe
Nearly a Posting Virtuoso
1,205 posts since Oct 2009
Reputation Points: 68
Solved Threads: 85
I would agree with SgtMe.
Even though you are running Windows7-64bit, you are better of to install the 32bit versions of Python and PyQt at this time.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Might have been incomplete uninstall.
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
This is the way I installed PyQt on my Windows XP machine and it works fine.
For Python26 download (latest versions as of 4/3/2010):
python-2.6.5.msi
Windows installer from
http://www.python.org/download/releases/2.6.5/
PyQt-Py2.6-gpl-4.7.2-1.exe
Windows installer from
http://www.riverbankcomputing.co.uk/software/pyqt/download
This was my little test program:
# pqt_Slider_LCD.py
# create PyQt form with slider and LCD readout
# get changing slider values for potentially other uses
# for easier syntax import this way
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class MyForm(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setWindowTitle('show slider value')
self.resize(250,150)
self.lcd = QLCDNumber(self)
# default slider values are 0 to 99
self.slider = QSlider(Qt.Horizontal, self)
# use vertical layout
vbox = QVBoxLayout()
vbox.addWidget(self.lcd)
vbox.addWidget(self.slider)
self.setLayout(vbox)
# connects the slider to the lcd number in change_value()
# and also allows access to the slider value as it changes
self.connect(self.slider, SIGNAL('valueChanged(int)'),
self.change_value)
def change_value(self, event):
"""show the changing slider value in the LCD display"""
val = self.slider.value()
print(val, type(val)) # test
# display value in the LCD widget
self.lcd.display(val)
app = QApplication([])
mf = MyForm()
mf.show()
app.exec_()
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
I just did Bumsfeld's Python26 and PyQt 32bit installation on my Dell Window7-64bit machine and it worked perfectly well.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417