How to add extra byte size in QbyteArray???

Am using the following code:

QByteArray buffer;
QByteArray buf;

buf.resize(40);

buffer+=buf;

I want to add 40 bytes extra to the buffer to move the data.. How it can be done..
please help me