Results 1 to 3 of 3

Thread: connect fails to compile: reference to 'connect' is ambiguous

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default connect fails to compile: reference to 'connect' is ambiguous

    I get the following error in this line:


    Qt Code:
    1. void QMicosPolluxController::waitUntilPositionReached()
    2. {
    3. connect(d->checkPositionThread, SIGNAL(positionReached(bool)), this, SIGNAL(positionReached()));
    4. }
    To copy to clipboard, switch view to plain text mode 

    The first class is derived from QThread, the second from QWidget.

    QMicosPolluxController.cpp: In member function 'virtual void QMicosPolluxController::waitUntilPositionReached() ':
    QMicosPolluxController.cpp:1047: error: reference to 'connect' is ambiguous
    c:\Qt\SDK\2011.05\Desktop\Qt\4.7.3\mingw\include\Q tCore/qobject.h:313: error: candidates are: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
    c:\Qt\SDK\2011.05\Desktop\Qt\4.7.3\mingw\include\Q tCore/qobject.h:198: error: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
    c:\Qt\SDK\2011.05\Desktop\Qt\4.7.3\mingw\include\Q tCore/qobject.h:313: error: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
    c:\Qt\SDK\2011.05\Desktop\Qt\4.7.3\mingw\include\Q tCore/qobject.h:198: error: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
    Half a year ago, the code compiled with Qt 4.6, now with 4.7.3 it does not. Has anything changed? At least I do not understand the error.
    Last edited by high_flyer; 9th May 2011 at 10:11. Reason: code tags

Similar Threads

  1. Replies: 4
    Last Post: 28th May 2011, 21:57
  2. Replies: 12
    Last Post: 30th December 2010, 10:37
  3. Replies: 16
    Last Post: 16th February 2010, 13:17
  4. ambiguous connect()
    By Cruz in forum Qt Programming
    Replies: 2
    Last Post: 27th August 2009, 11:35
  5. Replies: 4
    Last Post: 10th November 2006, 15:38

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.