Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Scanf with TextEdit
mertebe last edited by
I have a problem with qt creator. I study on "textEdit". I want to do "scanf" with textedit. Is it possible?
sraboisson last edited by
Not sure i understand completely your question,
Something like this would help :
connect (m_textEditName, SIGNAL(textChanged()), this, SLOT(nameChanged()));
m_theName = m_textEditName->toPlainText();
The slot function "nameChanged()" will be called every time the textEdit is modified, updating the filed member "m_theName" (Thank to the "connect")
(Perhaps a QLineEdit would be more suitable, no ?)
felipe.c.sousa last edited by
In Qt we don't use the function "scanf", you can give what is there in a variable or you can work just wich is in the line edit or text edit.
in line edit be this: