user10295: I am trying to send data from QSerialPort to Arduino Mega 2560. The proccess always takes some time to establish the connection. 
How do I know with QSerialPort is the connections is ready to send data?
I don't know how much time do I have to wait for that and it happens every time when I run the application. 
The configuration of my QSerialPort instance is:
mSerialPort = new QSerialPort();
mSerialPort->setPortName("COM3");
mSerialPort->setBaudRate(QSerialPort::Baud9600);
mSerialPort->setDataBits(QSerialPort::Data8);
mSerialPort->setParity(QSerialPort::NoParity);
mSerialPort->setStopBits(QSerialPort::OneStop);
mSerialPort->setFlowControl(QSerialPort::NoFlowControl);
mSerialPort->open(QIODevice::ReadWrite);

I check the device configuration of COM port:

I also changed and play the Arduino delay but nothing changed.
I am sending to Arduino little piece of data. Example:
X100.10,Y10.23, H9999, ...others

And these data work when I am debugging the functions of my application. Everything is writting and work. So I am lost. 
I hope all this information be usefull to give me an answer or at less some tips.

user4143: I am guessing that what you are seeing is not the port taking some time to open, but the Arduino resetting as soon as you open the serial port.  That means there is a short time while it's in the bootloader looking for an "I am here" signal from avrdude.  The timeout of that signal is configured in the bootloader, and is usually something like 1 second.
The simplest thing you can do is, as one of the first commands in your program, send an "I am ready to receive" signal to the computer (maybe just the word "OK" or something like that), which you then wait for before sending your data.

10295: <p>I am trying to send data from QSerialPort to Arduino Mega 2560. The proccess always takes some time to establish the connection. </p>

<p><strong><em>How do I know with QSerialPort is the connections is ready to send data?</em></strong></p>

<p>I don't know how much time do I have to wait for that and it happens every time when I run the application. </p>

<p>The configuration of my QSerialPort instance is:</p>

<pre><code>mSerialPort = new QSerialPort();
mSerialPort-&gt;setPortName("COM3");
mSerialPort-&gt;setBaudRate(QSerialPort::Baud9600);
mSerialPort-&gt;setDataBits(QSerialPort::Data8);
mSerialPort-&gt;setParity(QSerialPort::NoParity);
mSerialPort-&gt;setStopBits(QSerialPort::OneStop);
mSerialPort-&gt;setFlowControl(QSerialPort::NoFlowControl);
mSerialPort-&gt;open(QIODevice::ReadWrite);
</code></pre>

<p>I check the device configuration of COM port:</p>

<p><img src="https://i.stack.imgur.com/TVVu0.png" alt="enter image description here"></p>

<p>I also changed and play the Arduino delay but nothing changed.</p>

<p>I am sending to Arduino little piece of data. Example:</p>

<pre><code>X100.10,Y10.23, H9999, ...others
</code></pre>

<p>And these data work when I am debugging the functions of my application. Everything is writting and work. So I am lost. </p>

<p>I hope all this information be usefull to give me an answer or at less some tips.</p>
 4143: <p>I am guessing that what you are seeing is not the port taking some time to open, but the Arduino resetting as soon as you open the serial port.  That means there is a short time while it's in the bootloader looking for an "I am here" signal from avrdude.  The timeout of that signal is configured in the bootloader, and is usually something like 1 second.</p>

<p>The simplest thing you can do is, as one of the first commands in your program, send an "I am ready to receive" signal to the computer (maybe just the word "OK" or something like that), which you then wait for before sending your data.</p>
