[Qt-interest] convert QSlidBox value int char

Stefanos Antaris santaris at csd.auth.gr
Mon May 11 12:19:25 CEST 2009


Hello.Can anyone help me on how to convert the QSlidBoxValue into char?I 
want to send this using  a tcpSocket into another application.Here is my 
code.The other application receive vmf instead of vmf5 as i expect.The 
value 5 is the default of the SpinBox;

[code]
QString test;
int valueTest=ui->velocitySpinBox->value();
test=(char)valueTest;
ui->statusLabel->setText(test);
forwardOut<<quint8('v')<<quint8('m')<<quint8('f')<<quint16(test);
forwardOut.device()->seek(0);
actionTcpSocket->write(forwardBlock);


[\code]



More information about the Qt-interest-old mailing list