프로젝트에 PyQt를 사용하고 있습니다. 하지만 갑자기 오류가 발생하는 것은 아닙니다 :PyQt에서 QPixmap을 사용하지 않습니다. 그러나 나는 QPixmap을 얻습니다. PyQt의 GUI 스레드 외부에서 pixmaps를 사용하는 것은 안전하지 않습니다.
QPixmap: It is not safe to use pixmaps outside the GUI thread in PyQt
내 코드에서 QPixmap을 사용하고 있지 않습니다 ... 도와주세요.
class itemCheckBtn(QtGui.QDialog):
qApp = None;
okCallback = None;
def __init__(self,parent=None):
itemCheckBtn.qApp=None;
QtGui.QWidget.__init__(self, None)
self.ui = Ui_merchantPriceFrom();
self.ui.setupUi(self)
QtCore.QObject.connect(self.ui.itemCheckButton, QtCore.SIGNAL("clicked()"), self.submit)
def submit(self):
print "Hi";
주요 클래스는
class MyForm(QtGui.QMainWindow):
serverThreadObject = None;
qApp = None;
sock = None;
def __init__(self, qApp,parent=None):
MyForm.qApp=qApp;
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_bluwavemerchantmain()
self.ui.setupUi(self)
self.ui.server_connection_status_label.setText("Server Offline..");
QtCore.QObject.connect(self.ui.pushButton, QtCore.SIGNAL("clicked()"), self.connectUser)
QtCore.QObject.connect(self.ui.actionStart_Server, QtCore.SIGNAL("triggered()"), self.startServer);
QtCore.QObject.connect(self.ui.actionStop_Server, QtCore.SIGNAL("triggered()"), self.stopServerFromGui);
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL("triggered()"), self.closeEventFromMenu);
QtCore.QObject.connect(self, QtCore.SIGNAL("triggered()"), self.closeEvent);
내가 "MyForm을"클래스에서 클래스 "itemCheckBtn"를 호출하려고 할 때 오류를 얻고있다.