py file as long as there is code similar to self.myButton.clicked.connect (self.myPrint) in the code, after conversion to pyd, the call will pop up: python.exe has stopped working window, and then closed there is nothing, do not know how to start, please help the prophets, do not hesitate to give advice, thank you.
Thecode is as follows: a piece of code on the Internet can be run directly in python. As long as it is converted to pyd, the situation mentioned above will appear:
-sharp -*- coding: utf-8 -*-
"""
Module implementing MyWindow.
"""
from PyQt4.QtCore import pyqtSignature
from PyQt4.QtGui import QDialog
from Ui_cs_emit import Ui_Dialog
from PyQt4 import QtGui, QtCore
class MyWindow(QDialog, Ui_Dialog):
_signal=QtCore.pyqtSignal(str)
def __init__(self, parent=None):
"""
Constructor
@param parent reference to the parent widget (QWidget)
"""
QDialog.__init__(self, parent)
self.setupUi(self)
self.myButton.clicked.connect(self.myPrint) -sharp
self._signal.connect(self.mySignal)
def myPrint(self):
self.tb.setText("")
self.tb.append(u"")
self._signal.emit(u"")
def mySignal(self,string):
print "%s"%string
self.tb.append(u"")
@pyqtSignature("")
def on_myButton_clicked(self):
pass
if __name__=="__main__":
import sys
app = QtGui.QApplication(sys.argv)
myshow=MyWindow()
myshow.show()
sys.exit(app.exec_())
use qt
to create a dialog box: form name: MyWindow
A textEidt control: name: tb
A button control: name: myButton
Thecode is: I saw it on the Internet. I tried to convert it to pyd, with Cython and found the situation. I can"t find the relevant information, so I can only ask for advice
.