pyqt's
Qtimer
을 사용하면 다음과 같이 할 수 있습니다. 보다 구체적으로 singleShot
설정 : QTimer.singleShot (int msec, QObject receiver, SLOT()SLOT() member)
QtCore.QTimer.singleShot(1000, lambda: self.Box.append("Text2")) #1000 milliseconds = 1 second
아니면 사건이 구현 시도 할 수 있습니다 : 당신은 아마 이런 식으로 뭔가를 할 수있는 2
self.timerScreen = QTimer()
self.timerScreen.setInterval(1000) #1000 milliseconds = 1 second
self.timerScreen.setSingleShot(True)
self.timerScreen.timeout.connect(self.Box.append("Text2"))
파트를하지만, 추천하지 않습니다.
01 23,516,def testSleep(self):
self.lineEdit.setText('Start')
QtCore.QTimer.singleShot(10000, lambda: self.Box.append("Text2"))
QtCore.QTimer.singleShot(10000,lambda: self.timerEvent)
def timerEvent(self):
QtCore.QTimer.singleShot(10000, lambda: self.Box.append("Text3"))
당신은 그냥이 같은 일을 더 낫다 : 수면 전에 self.update()를 호출하는
x = 10000 #or whatever number
QtCore.QTimer.singleShot(10000 + x, lambda: self.Box.append("Text3"))
시도하고, 작품 도니는 다르게 – joaoricardo000