Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to connect signal and slot in two diffrent form ?

How to connect signal and slot in two diffrent form ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
emit signal
4 Posts 3 Posters 2.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MhM93
    wrote on 30 Apr 2016, 06:43 last edited by
    #1

    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?

    H.Ghassami

    K 1 Reply Last reply 30 Apr 2016, 11:18
    0
    • M MhM93
      30 Apr 2016, 06:43

      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?

      K Offline
      K Offline
      koahnig
      wrote on 30 Apr 2016, 11:18 last edited by
      #2

      @MhM93

      Probably 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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yuvaram
        wrote on 30 Apr 2016, 19:35 last edited by
        #3

        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)

        Yuvaram Aligeti
        Embedded Qt Developer
        : )

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MhM93
          wrote on 1 May 2016, 06:38 last edited by
          #4

          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.

          H.Ghassami

          1 Reply Last reply
          0

          1/4

          30 Apr 2016, 06:43

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved