error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int, vo
hello,
i have a probleme in the make of my qt project with C++,there is an error in the QT4 code that i dont have any idea cause is not me who develop this,so how can i do? what is the origine of this error
thx for your help dear QT developers ,i paste you the error :
<code>
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Isrc -Iinc -IQtCore -IQtGui -I. -I. -o moc_qbuffer.o moc_qbuffer.cpp
moc_qbuffer.cpp: In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int, void**)»:
moc_qbuffer.cpp:65: erreur: invalid use of incomplete type «struct QBufferPrivate»
QtCore/qbuffer.h:57: erreur: forward declaration of «struct QBufferPrivate»
make: *** [moc_qbuffer.o] Erreur 1
</code>
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
i tried to install QT another time but no way to resolve the problem !
i develop with linuw Ubuntu and i compile as you see with gcc
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
this error appears when you compile your own code or Qt sources? If your own, can you investigate what part of your own code causes error?
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
this error comes when i compile my code but my code have not the error the error is in a line of the moc_qbuffer.cpp of Qt libraries i tried to find this close but i cant, exactly in the
function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int, void**)»:
that sure my code call it from sequence of calls
is it because linux?i installed a new QT4 from installer but no way.
this the error again:
root@lassoued-laptop:/home/lassoued/ogr2gui-0.5# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Isrc -Iinc -IQtCore -IQtGui -I. -I. -o moc_qbuffer.o moc_qbuffer.cpp
moc_qbuffer.cpp: In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int, void**)»:
moc_qbuffer.cpp:65: erreur: invalid use of incomplete type «struct QBufferPrivate»
QtCore/qbuffer.h:57: erreur: forward declaration of «struct QBufferPrivate»
make: *** [moc_qbuffer.o] Erreur 1
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
sur des forum j'ai vu que c'est un qmake que je dois fair,mais ou comment ...!!
est-ce la solution?
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
now i changed to QT Creator is better i wish that's my code cause i have ew error here :
/home/lassoued/design/FormUI/Frm.cpp:5: erreur: invalid use of incomplete type «struct Ui::Frm»
that's the code:
Code:
#include "Frm.h"
#include "ui_Frm.h"
{
ui->setupUi(this);
}
Frm::~Frm()
{
delete ui;
}
Code:
#ifndef FRM_H
#define FRM_H
#include <QtGui/QMainWindow>
namespace Ui
{
class Frm;
}
{
Q_OBJECT
public:
~Frm();
private:
Ui::Frm *ui;
};
#endif // FRM_H
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
To me it seems you took some files from Qt sources, copied them to your project and tried to compile. This won't work, don't even try it - you have to link to Qt as a whole, you can't extract one or two classes from it.
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
yes that what i would use but how i can link Qt?
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
This is not a forum that teaches you how to be a software developer. You should know how to use libraries in your applications.
Re: error In member function «virtual int QBuffer::qt_metacall(QMetaObject::Call, int
why do you want to copy Qt sources into your app sources?? Can't you just use the Qt classes from compiled library like any other Qt user?