Qt trip planner example help
-
I downloaded the example for the Qt trip planner from here: http://www.informit.com/articles/article.aspx?p=1405552&seqNum=3
Both the server and client compile and I have set the server address to localhost. Nothing is happening when I click Search. The client's sendRequest slot is executed, so I know the connection has been established. But the client is stuck sending a request to the server. I don't think the server received the data.
@
void TripServer::incomingConnection(int socketId)
{
qDebug() << "Incoming Connection";
ClientSocket *socket = new ClientSocket(this);
socket->setSocketDescriptor(socketId);
}
@The qDebug statement is not printed. Does this mean the client hasn't connected to the server?
-
Usually if the slot is not connected there is a warning on the console. You should be seeing the qDebug() statement on the console as well though. It is possible it's not connected but it could be something else entirely.
-
I have no idea. It is specific to that project. It's just what they named their slots. It could be anything. Without seeing the code I can't tell.
-
I found my answer.
The parameter list has changed since Qt 4.8.1
http://qt-project.org/doc/qt-5/qtcpserver.html#incomingConnection
Thanks anyway.