-1

How do I connect a Signal from a form to a Slot in another form? In other words I have a value that I am manipulating in a dialog.ui file that I want to emit to a slot that changes the value in the main application.

  • The standard method is to pull values out of a dialog after the user dismisses it. You provide an accessor and pull the values you need before disposing of the dialog. – john elemans Mar 23 '16 at 20:36
  • I am new to Qt. Exactly what syntax do you use to do that. I feel as though I have tried many ways to no avail. – Ryan Pensinger Mar 23 '16 at 20:38
  • Here's one solution which does use signals; http://stackoverflow.com/questions/12470806/qdialog-exec-and-getting-result-value – john elemans Mar 23 '16 at 20:47
  • What good is it to downvote a Question if a comment as to why it is downvoted doesn't accompany it? How do I fix whatever issue is causing people to down vote a Question if I don't know whats wrong with the Question itself? School would have been quite difficult if Teachers just told you you were wrong but never told you the correct answer. – Ryan Pensinger Mar 30 '16 at 13:28

1 Answers1

1

go to controller of the main GUI and connect both of them , like :

    connect(form1,SIGNAL(increment()),form2,SLOT(manipulate()));

don't forget to use emit in the first form.

Amr Jer
  • 55
  • 7