Hello,
How can I modify this code that will work ? Because line 17 is not working..
Object::connect: No such slot qnicklist::invite(strInviteChannel) in qnicklist.cpp:146
Object::connect: No such slot qnicklist::invite(strInviteChannel) in qnicklist.cpp:146
To copy to clipboard, switch view to plain text mode
...
void qnicklist
::invite(QString strInviteChannel
) {
QString strNick
= this
->selectedItems
().
at(0)->text
();
qnicklist
::send(QString("INVITE %1 %2").
arg(strInviteChannel
).
arg(strNick
));
}
....
{
....
for (int i = 0; i < strOpenChannels.count(); i++)
{
QString strInviteChannel
= strOpenChannels.
at(i
);
if (strInviteChannel[0] == '#')
minvite->addAction(strInviteChannel, this, SLOT(invite(strInviteChannel)));
}
....
}
...
void qnicklist::invite(QString strInviteChannel)
{
QString strNick = this->selectedItems().at(0)->text();
qnicklist::send(QString("INVITE %1 %2").arg(strInviteChannel).arg(strNick));
}
....
void qnicklist::contextMenuEvent(QContextMenuEvent *e)
{
....
QMenu *minvite = new QMenu("Invite");
for (int i = 0; i < strOpenChannels.count(); i++)
{
QString strInviteChannel = strOpenChannels.at(i);
if (strInviteChannel[0] == '#')
minvite->addAction(strInviteChannel, this, SLOT(invite(strInviteChannel)));
}
....
}
To copy to clipboard, switch view to plain text mode
Bookmarks