Hi everyone,
I created a mapCode:
QMap<QString, VelocityModel> vmMap;
I try to do this, to retrieve a VelocityModel object.
but I get this error:Code:
vmMap.value(key);
c:/Qt/4.4.3/include/QtCore/../../src/corelib/tools/qmap.h:438: error: no matching function for call to `VelocityModel::VelocityModel()'
velocitymodel.h:7: note: candidates are: VelocityModel::VelocityModel(const VelocityModel&)
velocitymodel.h:10: note: VelocityModel::VelocityModel(QString, QString)
The only constructor I have is this one:
Code:
#include <QtGui> #include "velocitymodel.h"
Code:
#ifndef _VELOCITYMODEL_H_ #define _VELOCITYMODEL_H_ #include <QString> #include <QStringList> class VelocityModel { public: private: QString mModelName; QString mModelFile; QStringList velocities; }; #endif /* _VELOCITYMODEL_H_ */
Is there something I need to declare in my velocitymodel class, in order to retrieve the object?