This is my code:
itemnum = QInputDialog.getText(self, "Recall - Item", "Item No.", QLineEdit.Normal, "")
print itemnum
It returns (PyQt4.QtCore.QString(u'aa'), True)
. How do i get just the text "aa"
? Is the only solution to manipulate the string?
>>> from PyQt4.QtCore import QString
>>> s = QString('Test')
>>> s
PyQt4.QtCore.QString(u'Test')
>>> str(s)
'Test'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.