0

I have a QLineEdit object which I use to retrieve the user input. I am doing .text() to get the text. However it returns me something like <built-in method text of Pyside... object at..>

I just want to get the string inside the Line Edit box. Just to be clear, I am also doing that when a button is pressed. So I write something and then press the button. I even tried using selectAll(), but it just gives me None every time.

targetText = self.targetTextBox.text()
print str(targetText)
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
someuser
  • 43
  • 1
  • 8

1 Answers1

0

I got the mistake I was doing. i was doing print str(targetText). I tried it with just print targetText and it worked.

someuser
  • 43
  • 1
  • 8