Hey all,
I have a problem using connect. Currently i am using the QXmpp library to make chat a program that can be used over the google network.
Now i am following there examples to create a basic application, specifically this example http://qxmpp.googlecode.com/svn/trun...les/GuiClient/ .
In there constructor they have this line of code:
check = connect(&m_xmppClient.rosterManager(),
SIGNAL(rosterChanged(const QString&)),
this, SLOT(rosterChanged(const QString&)));
check = connect(&m_xmppClient.rosterManager(),
SIGNAL(rosterChanged(const QString&)),
this, SLOT(rosterChanged(const QString&)));
To copy to clipboard, switch view to plain text mode
Where m_xmppClient is:
QXmppClient m_xmppClient;
QXmppClient m_xmppClient;
To copy to clipboard, switch view to plain text mode
That should return this.
But when i do this in my application:
connect(&chatClient.rosterManager(), SIGNAL(rosterReceived()), this, SLOT(rosterReceived()));
connect(&chatClient.rosterManager(), SIGNAL(rosterReceived()), this, SLOT(rosterReceived()));
To copy to clipboard, switch view to plain text mode
With chatClient being:
QXmppClient chatClient;
QXmppClient chatClient;
To copy to clipboard, switch view to plain text mode
I get the following error:
../ChatApp/maindialog.cpp: In member function 'void mainDialog::createActions()':
../ChatApp/maindialog.cpp:56: error: no matching function for call to 'mainDialog::connect(QXmppRosterManager*, const char*, mainDialog* const, const char*)'
e
:/Qt
/2010.05/qt
/include
/QtCore
/..
/..
/src
/corelib
/kernel
/qobject.
h:198: note
: candidates are
: static bool QObject::connect(const QObject*,
const char*,
const QObject*,
const char*, Qt
::ConnectionType)e
:/Qt
/2010.05/qt
/include
/QtCore
/..
/..
/src
/corelib
/kernel
/qobject.
h:313: note
: bool QObject::connect(const QObject*,
const char*,
const char*, Qt
::ConnectionType) const
../ChatApp/maindialog.cpp: In member function 'void mainDialog::createActions()':
../ChatApp/maindialog.cpp:56: error: no matching function for call to 'mainDialog::connect(QXmppRosterManager*, const char*, mainDialog* const, const char*)'
e:/Qt/2010.05/qt/include/QtCore/../../src/corelib/kernel/qobject.h:198: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
e:/Qt/2010.05/qt/include/QtCore/../../src/corelib/kernel/qobject.h:313: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
To copy to clipboard, switch view to plain text mode
But i don't get this error on there example
Regards
Eekhoorn12
Bookmarks