PDA

View Full Version : qt_metacast(const char*)



sabeesh
3rd September 2007, 07:54
Hi,
I try to create a program in QT.4.2. when I 'make' the program, then an error display like this


===========================================



g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include -I. -Iheader -Ilib -I. -I. -o moc_VideoDevice.o moc_VideoDevice.cpp
VideoDevice.h:56: warning: direct base ‘QObject’ inaccessible in ‘CVideoDevice’ due to ambiguity
moc_VideoDevice.cpp: In member function ‘virtual void* CVideoDevice::qt_metacast(const char*)’:
moc_VideoDevice.cpp:81: error: cannot call member function ‘virtual void* QObject::qt_metacast(const char*)’ without object
moc_VideoDevice.cpp: In member function ‘virtual int CVideoDevice::qt_metacall(QMetaObject::Call, int, void**)’:
moc_VideoDevice.cpp:86: error: cannot call member function ‘virtual int QObject::qt_metacall(QMetaObject::Call, int, void**)’ without object
moc_VideoDevice.cpp: In member function ‘void CVideoDevice:red face pened()’:
moc_VideoDevice.cpp:117: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::Closed()’:
moc_VideoDevice.cpp:123: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::SizeChanged(const QSize&)’:
moc_VideoDevice.cpp:130: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::FramerateChanged(int)’:
moc_VideoDevice.cpp:137: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::Error(int)’:
moc_VideoDevice.cpp:144: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::FrameReady()’:
moc_VideoDevice.cpp:150: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
moc_VideoDevice.cpp: In member function ‘void CVideoDevice::TVChannelChanged()’:
moc_VideoDevice.cpp:156: error: ‘QObject’ is an ambiguous base of ‘CVideoDevice’
make: *** [moc_VideoDevice.o] Error 1

================================================== ==========

how can I solve this problum?
Please help me...............

marcel
3rd September 2007, 08:03
What are the base classes of VideoDevice?
In multiple inheritance approaches you may have only one QObject base class.

Regards