How to connect signal and slot in two diffrent form ?
-
wrote on 30 Apr 2016, 06:43 last edited by
Hi.
In my first page I want to emit signal that change some thing by slot in second form.
I do like this example : http://stackoverflow.com/questions/6199962/how-to-pass-data-from-one-form-to-another-in-qt
but not worked (maybe because I removed this code from main.cpp : "second.show(); " -> just this change ).
How can I do that? -
Hi.
In my first page I want to emit signal that change some thing by slot in second form.
I do like this example : http://stackoverflow.com/questions/6199962/how-to-pass-data-from-one-form-to-another-in-qt
but not worked (maybe because I removed this code from main.cpp : "second.show(); " -> just this change ).
How can I do that?wrote on 30 Apr 2016, 11:18 last edited byProbably it is better for you to start with an implementation and post about more specific issues when you are running into trouble.
There are examples around for interaction between different widgets (e.g. Slider example). That may give you a good start.
Certainly there is also the option to use the example from stackoverflow. However, you need to check if it does already something close to your goals. For issues popping up with your changed code, You should post here the relevant sections.
That will probably give you better chances for an answer you can use. -
wrote on 30 Apr 2016, 19:35 last edited by
Hi,
Here are some examples of signal and slots connected in different forms.
It may help you.
(http://doc.qt.io/qt-5/signalsandslots.html) -
wrote on 1 May 2016, 06:38 last edited by
It solved. I have a silly mistake. I call slot when my form is null and does not create.
In that example in stackoverflow both form create and they connect the signal and slot . but my second form is null.
1/4