我设置了监视程序来监视新文件的文件夹,我想在运行on_created函数后尝试返回主PyQt类。
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
class CreatedEvent(FileSystemEventHandler):
def on_created(self, event):
#some code
我需要能够调用someFunction
from PyQt4.QtGui import *
from PyQt4.QtCore import *
class someClass(QMainWindow):
def someFunction(self):
#some code
我尝试使用信号,但我总是收到此错误
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread