May 2015

I come up with an problem: I created an interface in pyqt4 designer, there is only a button and a status bar. I want to show a message in the status bar when I click the button. For some reason I have to put this action in a new thread. But when I click the […]

I want to save a file with a Chinese name in pyqt. It reports: IOError: [Errno 22] invalid mode (‘w’) or filename: PyQt4.QtCore.QString(u’D:/Users/zhout_000/Desktop/\u672a\u547d\u540d.dxf’) Reason: the type of the filename read from the file dialog is infact “QString”, not”string” Solve: convert QString to unicode: fileName=unicode(QtCore.QString(fileName))