Hi, I'm having problem passing arguments in SLOT:
private slot:
void connectToHost
(QString, quint32
);
private slot:
void connectToHost(QString, quint32);
To copy to clipboard, switch view to plain text mode
and I'm calling it like this:
connect(connectButton, SIGNAL(clicked()), this, SLOT(connectToHost(host, port)));
connect(connectButton, SIGNAL(clicked()), this, SLOT(connectToHost(host, port)));
To copy to clipboard, switch view to plain text mode
while the connectToHost is:
void MainWindow
::connectToHost(QString host, quint32 port
) { /* create and connect to the socket */
socket
->connectToHost
(host, port,
QIODevice::ReadOnly);
}
void MainWindow::connectToHost(QString host, quint32 port) {
/* create and connect to the socket */
socket = new QTcpSocket(this);
socket->connectToHost(host, port, QIODevice::ReadOnly);
}
To copy to clipboard, switch view to plain text mode
Problem is:
Object::connect: No such slot MainWindow::connectToHost(host,port)
Bookmarks