M
M
Marat Nagayev2019-09-26 22:46:37
Qt
Marat Nagayev, 2019-09-26 22:46:37

Dynamic button change on click?

I have a button on my form called button1.
I want to add a clicked event handler to it and change the text of the button in it.
I figured out how to add a handler, but I didn't figure out how to access the button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Marat Nagayev, 2019-09-26
@nagayev

Found a solution to the problem!
You need to use the ui variable.
ui->button1->setText(text);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question