B
B
Bowl of Soup2021-05-13 19:58:56
Qt
Bowl of Soup, 2021-05-13 19:58:56

How to pass text from one window to another in qt using the signals and slots mechanism?

The user enters his name in QLineEdit and on pressing the button a second window opens, where the user's greeting and his name are displayed in the label. How to implement this using the signals and slots mechanism?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2021-05-13
@SaNNy32

Why is there a signal/slot mechanism here? Just pass the value from QLineEdit::Text as a parameter to the second window's constructor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question