I'm not sure how accepted that approach is, but I personally really didn't like having to say QtGui and QtCore all the time, so I "from ... import *"-ed those. This makes a connect a couple words shorter and a lot less hideous.
On Jan 10, 2008 6:26 PM, Peter Shinners <[EMAIL PROTECTED]> wrote: > I'm sure this has come up, but as I write my Pyqt code, I keep noticing > that the QObject.connect call feels like a wart. Is there already a pyqt > shortcut for a call like this? > > QtCore.QObject.connect(myButton, QtCore.SIGNAL("clicked()"), > onClicked) > > The closer I could be to something like the following, the better. > > myButton.connect("clicked()", onClicked) > > Are there any shortcuts for wiring signals and slots I haven't noticed? > > _______________________________________________ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt