def count(interval):
global number
number = 0
while True:
number += 1
sleep(interval)
t = Thread(target = count, args = (5,))
t.daemon = True
t.start()
class MyClass(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setWindowTitle('Test')
label = QtGui.QLabel(str(number), self)
label.move(15, 10)
self.resize(250, 30)
app = QtGui.QApplication(sys.argv)
qb = MyClass()
qb.show()
sys.exit(app.exec_())
Подскажите в чем проблема?