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. [solved] error: undefined reference to `vtable for Biglietto’
Forum Updated to NodeBB v4.3 + New Features

[solved] error: undefined reference to `vtable for Biglietto’

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 3.1k 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
    spode
    wrote on last edited by
    #1

    @
    #ifndef BIGLIETTO_H
    #define BIGLIETTO_H

    #include <QColor>
    #include <QFile>
    #include <QTextStream>
    #include <QObject>

    class Biglietto : public QObject
    {
    Q_OBJECT

    public:
    explicit Biglietto(QString importanzaDellaParola, QString parolaDaTradurre, QString esempioTedesco, QString traduzioneDellaParola, QString esempioItaliano, QString sfondoDelBiglietto, QObject *parent = 0);

        Q_PROPERTY (QString sfondoBiglietto)
        Q_PROPERTY (QString parola)
        Q_PROPERTY (QString fraseInTedesco)
        Q_PROPERTY (QString traduzione)
        Q_PROPERTY (QString fraseInItaliano)
        Q_PROPERTY (QString importante)
    

    private:
    QString sfondoBiglietto;
    QString parola;
    QString fraseInTedesco;
    QString traduzione;
    QString fraseInItaliano;
    QString importante;
    };

    #endif // BIGLIETTO_H
    @

    @
    #include "biglietto.h"
    #include "gestore.h"

    Biglietto::Biglietto( QString importanzaDellaParola, QString parolaDaTradurre, QString esempioTedesco, QString traduzioneDellaParola, QString esempioItaliano, QString sfondoDelBiglietto, QObject *parent)
    : importante(importanzaDellaParola), parola(parolaDaTradurre), fraseInTedesco(esempioTedesco), traduzione(traduzioneDellaParola), fraseInItaliano(esempioItaliano), sfondoBiglietto(sfondoDelBiglietto), QObject(parent)
    {
    }
    @

    the problem is in the title of the topic and it is a reference to the last snippet, but i can not understand why...

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Diph
      wrote on last edited by
      #2

      Do you have HEADERS += biglietto.h in *.pro file? Did you run qmake?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dangelog
        wrote on last edited by
        #3

        From the "IRC factoids":http://tinyurl.com/qt-factoids

        Make sure the Q_OBJECT macro is present in the definition of all QObject-derived classes.

        Make sure you declare your QObject-derived classes in your header files ONLY.

        Make sure all of your header files are listed in your .pro file in the HEADERS= list.

        Run qmake every time you add Q_OBJECT to one of your classes or modify your .pro file.

        Also, check out http://doc.qt.nokia.com/latest/debug.html#common-bugs

        Software Engineer
        KDAB (UK) Ltd., a KDAB Group company

        1 Reply Last reply
        0
        • S Offline
          S Offline
          spode
          wrote on last edited by
          #4

          yes, i did everything... now this error is solved. thank you! =)

          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