No Matching function to call...
Hy,
I'm a bit new to Qt and C++ (even if I have program in different languages).
I've got a search box with this in (searchFiled is a QLineEdit):
Code:
connect(this
->m_ui
->searchField,
SIGNAL(textEdited
(const QString &)),
this,
SIGNAL(searchStringChanged
(const QString &)));
In my main window constructor I dot that:
Code:
m_searchdialog = new searchDialog();
m_searcher = new searcher();
connect(m_searchdialog,
SIGNAL(searchStringChanged
(const QString &)),
m_searcher,
SLOT(newResearch
(const QString &)));
And when I compile I've got this error:
Code:
mainwindow.cpp:19: error: no matching function for call to ‘mainWindow::connect(searchDialog*&, const char [38], searcher*&, const char [30])’
/usr
/local
/Trolltech
/Qt
-4.1.4
/include
/QtCore
/qobject.
h:176: note
: candidates are
: static bool QObject::connect(const QObject*,
const char*,
const QObject*,
const char*, Qt
::ConnectionType) /usr
/local
/Trolltech
/Qt
-4.1.4
/include
/QtCore
/qobject.
h:276: note
: bool QObject::connect(const QObject*,
const char*,
const char*, Qt
::Connection Type
) const
Any idea ?
Because I'm stuck for 2 hours... I'm a little bit bored now :P
Re: No Matching function to call...
3 possibilites:
1) the place you call connect in is not a subclass of QObject
2) m_searcher is not a subclass of QObject
3) m_searchdialog is not a subclass of QObject
usually it's 1)
HTH
PS: if it is 1), you may fix it with
Code:
receiver->connect(sender, SIGNAL(...), SLOT(...));
Re: No Matching function to call...
Quote:
Originally Posted by
caduel
3 possibilites:
1) the place you call connect in is not a subclass of QObject
2) m_searcher is not a subclass of QObject
3) m_searchdialog is not a subclass of QObject
usually it's 1)
HTH
Actually it was 2).
May I worship you ? :P