connecttohost TcpSocket parameters from Textfield
-
void Tcpip_Client::tcpConnect(const QString server_name, QString server_port) { tcpSocket->abort(); tcpSocket->connectToHost(server_name,server_port);
When I write the address instead of getting it from a text field it works. but when i try to get it from textfield it does not. do i need some data conversion here ?
-
void Tcpip_Client::tcpConnect(const QString server_name, QString server_port) { tcpSocket->abort(); tcpSocket->connectToHost(server_name,server_port);
When I write the address instead of getting it from a text field it works. but when i try to get it from textfield it does not. do i need some data conversion here ?
Your code snippet looks odd. The second parameter of connectToHost is
quint16
, notQString
.Regards
-
Your code snippet looks odd. The second parameter of connectToHost is
quint16
, notQString
.Regards
@aha_1980 Thanks I found it out
-
@aha_1980 Thanks I found it out
@Prasad_Socionext if you issue is solved, please don't forget to mark your post as such. Thanks.
-
@Prasad_Socionext if you issue is solved, please don't forget to mark your post as such. Thanks.
@Pablo-J.-Rogina how to mark it ?
-
@Pablo-J.-Rogina how to mark it ?
@Prasad_Socionext
On your first post, in "Topic tools" there is menu item.