Hello I am having an issue with PyQt when it comes to splitting an string.
I am currently grabbing the input text from a TextEdit field and splitting the string inputted into a list.
start_token = self.serialInputText.toPlainText()
split_start = start_token.split(' ')
print start_token + '\r\n'
print split_start
However whenever I print this to see what my new string list is I get the following:
<PyQt4.QtCore.QStringList object at 0x10b18a488>
Which i believe is the memory address of the StringList. Instead I would like to print the StringList out and view it to make sure it is functioning correctly.
I have tried a different approach and imported import sip
and used sip.setapi("QString", 2)
and then when i print my StringList it will appear as the following:
[u'Dog', u'Cat', u'Bird', u'Animals', u'Tigers', u'Etc']
which is fine however it's adding a u
to every entry in the list.
Simply put, I want to have a TextEdit field and text will be inputted into that field. Then that text needs to be separated via a space delimiter to be used for another function later on in the program.