PDA

View Full Version : qt3 socket receive problems



naga1003
15th October 2009, 05:12
:confused:
my qt3 socket client code about receive the byte[] is as below:

char information[1024];
int i=socket->readBlock(information,1024);//i find that i =1024,so the socket do receive the message form server

textLable->setText(tr(information[0]));//i want to print the first byte of the message,but i always get nothing to show,please tell me why???and ,how can i show the byte in qt3,for example:the server send a byte 10(oct) ,how can i show"10" in qt3's textLable???