Tavit
20th March 2008, 12:05
hi
how can i send text string or a block of binary numbers over a LAN to another computer so that i can receive it there and display the data i send. I tried QSocket but it din't work. Here is the Code :
void transmitter::dothis()
{
QVector<QRadioButton*> rButtonContainer;
rButtonContainer.push_back(radioButton_1);
rButtonContainer.push_back(radioButton_2);
rButtonContainer.push_back(radioButton_3);
rButtonContainer.push_back(radioButton_4);
rButtonContainer.push_back(radioButton_5);
rButtonContainer.push_back(radioButton_6);
QString str;
for(int i=0; i <rButtonContainer.size(); ++i)
{
if(rButtonContainer[i]->isChecked())
{
str+=rButtonContainer[i]->text();
}
QByteArray block = "";
block.append(inputLine->text() );
socket->write(block);
}
}
I have to send the Label of the RadioButton which is checked over the Network to another computer. Which i am not able to. ?? !!
What is the code the receive slot should have to receive and display the data sent from the transmitter. ?? Pls get me out of this prob.
Thank you
how can i send text string or a block of binary numbers over a LAN to another computer so that i can receive it there and display the data i send. I tried QSocket but it din't work. Here is the Code :
void transmitter::dothis()
{
QVector<QRadioButton*> rButtonContainer;
rButtonContainer.push_back(radioButton_1);
rButtonContainer.push_back(radioButton_2);
rButtonContainer.push_back(radioButton_3);
rButtonContainer.push_back(radioButton_4);
rButtonContainer.push_back(radioButton_5);
rButtonContainer.push_back(radioButton_6);
QString str;
for(int i=0; i <rButtonContainer.size(); ++i)
{
if(rButtonContainer[i]->isChecked())
{
str+=rButtonContainer[i]->text();
}
QByteArray block = "";
block.append(inputLine->text() );
socket->write(block);
}
}
I have to send the Label of the RadioButton which is checked over the Network to another computer. Which i am not able to. ?? !!
What is the code the receive slot should have to receive and display the data sent from the transmitter. ?? Pls get me out of this prob.
Thank you