У меня проблема с автоматически сгенерированным кодом Qt's Q_MOC_OUTPUT_REVISION
.
По существу, когда я щелкаю, чтобы собрать, я получаю ошибки ниже. Я не совсем уверен, что все это означает, и я был занят в течение последнего часа, пытаясь выяснить, что это значит, но я был бы признателен за более информированное объяснение того, что означают ошибки и как я могу избавиться от них *. 1004 *
class Product: public QObject
{
Q_OBJECT
Q_PROPERTY(QString _productid READ _productid WRITE _productid)
Q_PROPERTY(QString _productcategoryid READ _productcategoryid WRITE _productcategoryid)
Q_PROPERTY(QString _name READ _name WRITE _name)
Q_PROPERTY(Productcontent * contents READ contents WRITE contents)//dynamic allocation of space for contents
Q_PROPERTY(QString _productimagepath READ _productimagepath WRITE _productimagepath)
Q_PROPERTY(QString _producticonpath READ _producticonpath WRITE _producticonpath )
Q_PROPERTY(QString _productPrice READ _productPrice WRITE _productPrice )
//since this does not change for each product, no need resending it each time
public:
static const string _xmldocpath;
static const string rootitemname;
static const string tagname;
QString _productid;
QString _name;
QString _productcategoryid;
QString _productimagepath;
QString _producticonpath;
QString _productPrice;
Product();
// const std::string &getfilepath();
// const std::string &getproducttagname();
// bool UpdateProductData(string id);
Q_INVOKABLE int FindProductByID(QString id);
~Product();
public slots:
signals:
};
Результаты следующие ошибки. Я понятия не имею, как разобраться с этим. Любая помощь будет принята с благодарностью.
debug\moc_product.cpp: In member function 'virtual int Productcontent::qt_metacall(QMetaObject::Call, int, void**)':
debug\moc_product.cpp:77: error: no match for call to '(QString) ()'
debug\moc_product.cpp:78: error: no match for call to '(QString) ()'
debug\moc_product.cpp:84: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:85: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp: In member function 'virtual int Product::qt_metacall(QMetaObject::Call, int, void**)':
debug\moc_product.cpp:179: error: no match for call to '(QString) ()'
debug\moc_product.cpp:180: error: no match for call to '(QString) ()'
debug\moc_product.cpp:181: error: no match for call to '(QString) ()'
debug\moc_product.cpp:182: error: 'contents' was not declared in this scope
debug\moc_product.cpp:183: error: no match for call to '(QString) ()'
debug\moc_product.cpp:184: error: no match for call to '(QString) ()'
debug\moc_product.cpp:185: error: no match for call to '(QString) ()'
debug\moc_product.cpp:191: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:192: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:193: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:194: error: 'contents' was not declared in this scope
debug\moc_product.cpp:195: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:196: error: no match for call to '(QString) (QString&)'
debug\moc_product.cpp:197: error: no match for call to '(QString) (QString&)'
mingw32-make.exe[1]: Leaving directory `C:/Users/minel/QMLUIProject_One-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
mingw32-make.exe[1]: *** [debug/moc_product.o] Error 1
mingw32-make.exe: *** [debug] Error 2
17:45:04: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project QMLUIProject_One (target: Desktop)
When executing build step 'Make'