I developed a service with QTService with this function

class DataManageublic QObject
{
public:
DataManage(QObject* parent = 0);
void ReceiveData(void);
private:
QLocalSocket* lpLocalSocket;
private slots:
void ReadData(void);
void displayError(QLocalSocket::LocalSocketError socketError);
};


void SettingWidget::SendDataToService(void)
{
QLocalSocket *lpClientConnection = lpLocalServer->nextPendingConnection();
connect(lpClientConnection, SIGNAL(disconnected()),
lpClientConnection, SLOT(deleteLater()));
strcpy(s,"eqw\n");
lpClientConnection->write(s);
lpClientConnection->flush();
lpClientConnection->disconnectFromServer();
}

void DataManage::ReceiveData(void)
{
lpLocalSocket = new QLocalSocket(this);
connect(lpLocalSocket, SIGNAL(readyRead()), this, SLOT(ReadData()));
connect(lpLocalSocket, SIGNAL(error(QLocalSocket::LocalSocketError)),
this, SLOT(displayError(QLocalSocket::LocalSocketError)) );
lpLocalSocket->abort();
lpLocalSocket->connectToServer("aaaa");
}

void DCSPlusDataManager:rocessCommand(int code)
{
logMessage("processCommand", QtServiceBase::Information );
switch (code)
{
case 1:
DataManage* lpDataManage = new DataManage();
lpDataManage->ReceiveData();
break;
}
}

From the main application I send the command that activate processCommand() of the service. It runs.
Then I send the data to the socket:

void SettingWidget:n_pushButtonApply_clicked(bool)
{
lpLocalServer = new QLocalServer(this);
if (lpLocalServer->listen("aaaa"))
{
connect(lpLocalServer, SIGNAL(newConnection()), this, SLOT(SendDataToService()));
SC_SendCommand(1);
}
}
//----------------------------------------------------------------------------

void SettingWidget::SendDataToService(void)
{
QLocalSocket *lpClientConnection = lpLocalServer->nextPendingConnection();
connect(lpClientConnection, SIGNAL(disconnected()),
lpClientConnection, SLOT(deleteLater()));

strcpy(s,"eqw\n");
lpClientConnection->write(s);
lpClientConnection->flush();
lpClientConnection->disconnectFromServer();

}

The function SendDataToService() is called, although the lpClientConnection->write(s) doesn't call the ReadData() slot connected with readyRead() sognal.
Where can be the probem?

Thanks