0

I'm planning to programm a Class for managing my Windows. It will depend on Signals and Slots. I checked a lot of Threads here about that topic but it didnt help me. Sp here is my Code.

Header:

#ifndef WINDOWHANDLER_H
#define WINDOWHANDLER_H

#include <QObject>

class WindowHandler : public QObject
{
    Q_OBJECT

public:
    WindowHandler();

signals:

    void showFrmMain(bool);
    void showLogin(bool);
    void showRegister(bool);
    void showVerbindungsaufbau(bool);
};


#endif // WINDOWHANDLER_H

CPP:

#include "windowhandler.h"

WindowHandler::WindowHandler()
{

}

I didnt wrote lot of Code here, but I stuck cause this problem very hard :/ The complete Errormessage is: undefined reference to `vtable for WindowHandler' I got it two times. Both for the Constructor once in the .h and once in the .cpp.

I hope You can help me and thanks!

zdf
  • 4,382
  • 3
  • 18
  • 29
  • Do you have any virtual functions in your class? Maybe some function overriding QObject ones which you forgot to provide definitions? – Revolver_Ocelot Mar 18 '16 at 18:32
  • No I only have those I posted in the Class. I did not use one of the Signal-Methodes here. Maybe it is something about that? – Benjamin Bardroff Mar 18 '16 at 18:35
  • The duplicated question link isn't helpful in this case, I assume it's related to the meta object compiler, in which case this link is more helpful: https://stackoverflow.com/questions/4774291/q-object-throwing-undefined-reference-to-vtable-error. Or this one: https://stackoverflow.com/questions/2555816/qt-linker-error-undefined-reference-to-vtable – Thomas McGuire Mar 18 '16 at 22:44

0 Answers0