Q
Q
QtNoob2016-02-05 16:15:30
Qt
QtNoob, 2016-02-05 16:15:30

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.
Z0BiHU-aLJs.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TriKrista, 2016-02-05
@QtNoob

button -
line button - string field
browse - browser text

connect(button, SIGNAL(clicked()), this, SLOT(slotClicked())); // это устаревшая запись, используйте другую.

void slotClicked() {
    QString str = line->text();
    ///....
    browse->setText(str);
}

Ps Read Schlee, everything is described in detail there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question