我试着每5秒钟动态更改一次图像,第一次显示正确,之后什么都不显示,这是我的代码
def imageSelect(self):
name = self.selectImageFromDb()#Fetch image name from database one by one
self.pic.clear()
myPixmap = QtGui.QPixmap(_fromUtf8(path + "images/" + name))
self.pic.setPixmap(myPixmap)
self.pic.show()
threading.Timer(3, self.imageSelect).start()`
如果我接电话
在函数
imageSelect()
之外,我可以重现这种行为。我收到错误消息:所以我改用
QTimer
(成功):相关问题 更多 >
编程相关推荐