Answer the question
In order to leave comments, you need to log in
How to link 3 objects in QT to each other?
I started to study QT, set myself a small task and immediately I can’t implement it. Question: how to make it so that when a button is pressed, the text written in a line and being processed by the algorithm is displayed in the text browser? I can't figure out how to implement this in terms of signals and slots. Help me please.
Answer the question
In order to leave comments, you need to log in
button -
line button - string field
browse - browser text
connect(button, SIGNAL(clicked()), this, SLOT(slotClicked())); // это устаревшая запись, используйте другую.
void slotClicked() {
QString str = line->text();
///....
browse->setText(str);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question