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. Derive signals from base class? [Solved]

Derive signals from base class? [Solved]

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.5k 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.
  • Z Offline
    Z Offline
    Zee99
    wrote on last edited by
    #1

    Hi,

    i basically have a base class that define a few signals of its own. I then want to use this class as a base for serveral other classes i plan to use in my project. the problem is when i try to use any of the signals in the base class in a derived class, i get compile errors saying "undefined reference to signalName." the errors go away if i redefine these signals in the derived classes but i don't want to do this.

    does Qt not allow inheritance of signals? i'll post a code example if need be.

    Thanks

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

      Hi and welcome to devnet,

      Yes the signals can be emitted from subclasses. Please post your code example

      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
      0
      • Z Offline
        Z Offline
        Zee99
        wrote on last edited by
        #3

        Hi and thanks for the welcome. I think i managed to fix my problem, i ended up completely deleting the the files in my build folder as a way to force the complier to start over and that seem to have worked. the entire project now complies perfectly fine.

        i am curious as to why this would happen though. i have done several test builds before, i just always assumed the complier would update files that were changed. i guess it missed a few at some point.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ankursaxena
          wrote on last edited by
          #4

          Godmode99! Yes. It happens some time . So u have to use clean. Please tag it as a [Solved]. thanx.

          1 Reply Last reply
          0

          • Login

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