Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Not able to catch signal from one class to another class
Forum Updated to NodeBB v4.3 + New Features

Not able to catch signal from one class to another class

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 557 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    sapna
    wrote on last edited by
    #1

    Hi All,
    i have two classes "dltwindow" & "dltviewfiew".i have a button in "dltwindow" which onclick i am emitting one signal from dltwindow and trying to catch in dltfileview. The problem i am facing is dltwindow has a parameterized constructor which is giving function mismatched type error.I tried creating the object of dltwindow in dltfileview,since i dont have the arguments specified in the dltwindow constructor,i am not able to catch the signal emitted from dltwindow .Is there any otherway to do the same.

    Any guidance is appreciated.
    Thank you.

    Pablo J. RoginaP VRoninV 2 Replies Last reply
    0
    • S sapna

      Hi All,
      i have two classes "dltwindow" & "dltviewfiew".i have a button in "dltwindow" which onclick i am emitting one signal from dltwindow and trying to catch in dltfileview. The problem i am facing is dltwindow has a parameterized constructor which is giving function mismatched type error.I tried creating the object of dltwindow in dltfileview,since i dont have the arguments specified in the dltwindow constructor,i am not able to catch the signal emitted from dltwindow .Is there any otherway to do the same.

      Any guidance is appreciated.
      Thank you.

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @sapna if you could provide your code to better understand your issue...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • S sapna

        Hi All,
        i have two classes "dltwindow" & "dltviewfiew".i have a button in "dltwindow" which onclick i am emitting one signal from dltwindow and trying to catch in dltfileview. The problem i am facing is dltwindow has a parameterized constructor which is giving function mismatched type error.I tried creating the object of dltwindow in dltfileview,since i dont have the arguments specified in the dltwindow constructor,i am not able to catch the signal emitted from dltwindow .Is there any otherway to do the same.

        Any guidance is appreciated.
        Thank you.

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @sapna said in Not able to catch signal from one class to another class:

        I tried creating the object of dltwindow in dltfileview

        ??? No, just no!

        just declare the slot as public in dltviewfiew and add the connect(this,/*signal from dltwindow*/,dltviewfiew,/*slot in dltviewfiew*/); to dltwindow

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        3
        • S Offline
          S Offline
          sapna
          wrote on last edited by
          #4

          Thank you for the reply.
          I tried with this.But I am getting the following error: "expected primary-expression before ', ' token".

          1 Reply Last reply
          0
          • aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @sapna If you want us to help you, you will need to show the code that lead to this compile error. Also, do you have more compile errors? They might accumulate and then searching the root cause gets more complicated.

            Qt has to stay free or it will die.

            1 Reply Last reply
            3

            • Login

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