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. undefined reference to `vtable for MainWindow'
Forum Updated to NodeBB v4.3 + New Features

undefined reference to `vtable for MainWindow'

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.4k Views 2 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.
  • A Offline
    A Offline
    amigo421
    wrote on last edited by
    #1

    Hi

    Created my first Qt project (Gui)
    droped the button on the main form
    and added a handler for this button clicking
    and got this error.

    how can this be fixed and why this was raised in the trivial project?

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

      Hi,

      It generally means that at some point you added/removed the Q_OBJECT macro. In any case, re-run qmake and rebuild your project and you should be good to go

      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
      • A Offline
        A Offline
        amigo421
        wrote on last edited by
        #3

        looks like a magic
        rerun qmake/rebuild didn't solve the issue
        but re-creating the project solved

        thank you in any case!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          amigo421
          wrote on last edited by
          #4
          This post is deleted!
          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