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. Error when using QSignalSpy

Error when using QSignalSpy

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 606 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.
  • Q Offline
    Q Offline
    QTLeearn
    wrote on last edited by QTLeearn
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you writing a test ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you writing a test ?

        Q Offline
        Q Offline
        QTLeearn
        wrote on last edited by
        #3

        @sgaist I just want to trace a signal to see if it is emitted properly, I am open to any other methods

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you give more details about your use case ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Q 1 Reply Last reply
          0
          • SGaistS SGaist

            Can you give more details about your use case ?

            Q Offline
            Q Offline
            QTLeearn
            wrote on last edited by QTLeearn
            #5

            @sgaist If you are asking about the use case of QSignalSpy, what I can add on is I used the QSignalSpy in this way instead of what I provided:

            QSignalSpy spy(this, &myClass::testSignal);  // didn't compile 
            

            And the full error messages were:

            1. Undefined reference to 'vtable for QTestEventLoop' (Error in qtesteventloop.h)
            2. In function 'QTestEventLoop::~QTestEventLoop();' (Error in myClass.o)

            I was actually facing the problem that though a connection was established successfully (by observing the return boolean value of function connect ), but the slot is not evoked. I am testing to see if the signal emitted properly, also there might be the case that either sender or receiver was destroyed

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Then you should rather check the lifetime of the objects that are connected.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              • Login

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