Skip to content

Instantly share code, notes, and snippets.

Created Aug 5, 2010
What would you like to do?
I just wanted to test and show something about processEvents
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import time
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication(sys.argv)
widget = QtGui.QWidget()
widget.resize(250, 150)
widget.setWindowTitle('Hello, World!')
te = QtGui.QTextEdit(widget)
def append():
i = 0
while True:
te.append(" %d" % i)
i += 1
app.processEvents() # <<<
btn = QtGui.QPushButton("Append", widget)
widget.connect(btn, QtCore.SIGNAL('clicked()'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment