Results 1 to 2 of 2

Thread: qt_metacast(const char*)

  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qt_metacast(const char*)

    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...............

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt_metacast(const char*)

    What are the base classes of VideoDevice?
    In multiple inheritance approaches you may have only one QObject base class.

    Regards

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.