[PyKDE] QT4.1.4 and PyQT4-snapshot-20060716 on MacOSX
Phil Thompson
phil at riverbankcomputing.co.uk
Thu Jul 20 09:48:53 BST 2006
On Wednesday 19 July 2006 11:59 pm, Tobias Rundström wrote:
> >> Oh, that strikes me as weird.
> >>
> >> I have MacOSX 10.4.7 on a MacBook Intel.
> >>
> >> Can you think of any reason why signals wouldn't be propagated
> >> properly?
> >
> > A bug in your code?
>
> Phil,
>
> In that case all the examples bug too. I can open random example from
> the distribution and not get any of the buttons to respond. I tried
> for example simplewizard.py, and I never get the next button to be
> active and pressing the cancel button won't do anything.
>
> Not even this simple program does anything useful: Meaning that it
> starts, but pressing the button doesn't do anything.
>
> from PyQt4 import QtGui, QtCore
> import sys
>
> class Mw(QtGui.QMainWindow):
> def __init__(self):
> QtGui.QMainWindow.__init__(self)
> pb = QtGui.QPushButton("foo")
> self.connect(pb, QtCore.SIGNAL("clicked()"), self.foo)
> self.setCentralWidget(pb)
>
> def foo(self):
> print "button pressed"
>
> ap = QtGui.QApplication(sys.argv)
> mw = Mw()
> mw.show()
> ap.exec_()
Then there is something wrong with your installation. I assume you are using
pythonw and not python.
Phil
More information about the PyQt
mailing list