[PyQt] QTimer.singleShot
Jason H
scorp1us at yahoo.com
Fri Oct 9 04:15:13 BST 2009
Ok, to get it, try this:
import pdb
import sys
from PyQt4 import QtCore, QtGui
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
QtCore.QTimer.singleShot(0, self.start)
def start(self):
pdb.set_trace()
print 'start'
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
mw = MainWindow()
mw.show()
sys.exit(app.exec_())
And with that, how are we supposed to use the debugger?
More information about the PyQt
mailing list