Hi to all,
(wysota sorry in advance if my question is trivial ).
I would know why these 2 piece of code give different result:

Qt Code:
  1. QByteArray ba = m_axobj->dynamicCall("GetUserData(QString)", id ).toByteArray();
  2. quint16 templatesize = 0;
  3. memcpy( &templatesize, &ba[87], sizeof(quint16) );
  4. templatesize = qFromBigEndian(templatesize);
  5. qDebug() << templatesize;
To copy to clipboard, switch view to plain text mode 

And

Qt Code:
  1. QByteArray ba = m_axobj->dynamicCall("GetUserData(QString)", id ).toByteArray();
  2. const char *dat = ba.constData();
  3. quint16 templatesize = 0;
  4. memcpy( &templatesize, dat+87, sizeof(quint16) );
  5. templatesize = qFromBigEndian(templatesize);
  6. qDebug() << templatesize;
To copy to clipboard, switch view to plain text mode 

Reading QByteArray documentation the [i] operator should return the byte at position i so with the & operator I get its address.
This should be the same of adding the offset i at the first value address.
I'm sure I'm wrong but where?