In my ongoing quest to work with Qt to build UIs, I have a hard time figuring out how to read text from a QLineEdit. I built my interface with QtDesigner, added a QLineEdit and gave it the name “txtMyText”.
What’s the correct way to query the text from this QLineEdit. I assumed I could do something like
cmds.textField("txtMyText", query = True, text = True)
but that gives me an error:
# RuntimeError: Object 'txtMyText' not found.
Which, when you think about it, makes sense since a QLineEdit is not the same as a textField.
But how then do you find the QLineEdit “txtMyText” from a script?
Any help is appreciated!