L
L
l2p2014-04-28 20:53:24
Qt
l2p, 2014-04-28 20:53:24

How to read the contents of a TextEdit?

QObject* name = Main->findChild<QObject*>("input_name_text");

input_name_text- id and objectname TextEdit.
How can I get text from there?
QT 4.7, QML

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Salabar, 2014-05-05
@Salabar

QTextEdit* name = Main->findChild("Object_Name_edit");
Now its fields can be accessed through a pointer. Most likely something like name->text()

A
acra, 2014-10-07
@acra

//Find the input string
QObject* textinput = viewer->findChild("textinput");
//Reading information from the input string through the text property
QString str=(textinput->property("text")).toString();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question