Is it me or are you trying to send a QString object through the line? I'm surprised it even compiles... Provided that your write() calls really mean ::write() then the second argument should be a pointer to a const char* buffer. Could you paste the real and current code you're using? Because I don't think there is a strlen() variant that takes a QString as well...