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
↧