Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Problem when create an Object : Undefiner reference

$
0
0
Hi all, i don’t understand the problem becuse the “undefine references” error s tu approssimative for debug and in my code is all defined but: QList<Oggetto*> InterfacciaDataModel::convertitore(QList<MeteoLocale> lista){  QList<Oggetto*> listToReturn;    for(int i=0; i < lista.count(); i++) {   Oggetto oggetto(lista.at(i).property);  // here there are an error: undefined reference to `Oggetto::Oggetto(QHash<QString, QString>)'   listToReturn.append(&oggetto);  } // and here i have the same error but for destructor: undefined reference to `Oggetto::~Oggetto()'    return listToReturn; } in my .h file of Oggetto i define both method: #include <QObject> #include <QHash>   class Oggetto: public QObject {    Q_OBJECT   public:  Oggetto();  Oggetto(QHash<QString, QString> param);  virtual ~Oggetto();    QHash<QString, QString> property; } and avery one can see the definition in the .cpp file: #include "Oggetto.h"   Oggetto::Oggetto(QHash<QString, QString> param) {  // TODO Auto-generated constructor stub  this->property(param); }   Oggetto::Oggetto(){   }   Oggetto::~Oggetto() {  // TODO Auto-generated destructor stub } anione know why i have this error?? regards to all

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>