1

我已经设置了监视程序来监视新文件的文件夹,并且我想在运行 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
4

0 回答 0