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):
connect(this
->m_ui
->searchField,
SIGNAL(textEdited
(const QString &)),
this,
SIGNAL(searchStringChanged
(const QString &)));
connect(this->m_ui->searchField, SIGNAL(textEdited(const QString &)),
this, SIGNAL(searchStringChanged(const QString &)));
To copy to clipboard, switch view to plain text mode
In my main window constructor I dot that:
m_searchdialog = new searchDialog();
m_searcher = new searcher();
connect(m_searchdialog,
SIGNAL(searchStringChanged
(const QString &)),
m_searcher,
SLOT(newResearch
(const QString &)));
m_searchdialog = new searchDialog();
m_searcher = new searcher();
connect(m_searchdialog, SIGNAL(searchStringChanged(const QString &)),
m_searcher, SLOT(newResearch(const QString &)));
To copy to clipboard, switch view to plain text mode
And when I compile I've got this error:
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
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
To copy to clipboard, switch view to plain text mode
Any idea ?
Because I'm stuck for 2 hours... I'm a little bit bored now :P
Bookmarks