Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これは私のコードです:
itemnum = QInputDialog.getText(self, "Recall - Item", "Item No.", QLineEdit.Normal, "") print itemnum
返します(PyQt4.QtCore.QString(u'aa'), True)。テキストだけを取得するにはどうすればよい"aa"ですか? 文字列を操作する唯一の解決策はありますか?
(PyQt4.QtCore.QString(u'aa'), True)
"aa"
>>> from PyQt4.QtCore import QString >>> s = QString('Test') >>> s PyQt4.QtCore.QString(u'Test') >>> str(s) 'Test'