I want to concatenate two binary files.

Basically there is a header file containing a Print Job ticket and a PDF file. I want to put the two together..

Here is what I have..

Qt Code:
  1. QFile file("out.prn");
  2. if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
  3. return;
To copy to clipboard, switch view to plain text mode 

The Ticket is obtained and opened read only...

Qt Code:
  1. QString ticketName = ticketComboBox->currentText();
  2. QFile *ticket = new QFile(ticketName, ftp);
  3. ticket->open(QIODevice::ReadOnly);
  4. QFileInfo ti( ticketName );
To copy to clipboard, switch view to plain text mode 

Then the PDF file...
Qt Code:
  1. QString fileName = directoryComboBox->currentText();
  2. QFile *file = new QFile(fileName, ftp);
  3. file->open(QIODevice::ReadOnly);
  4. QFileInfo fi( fileName );
To copy to clipboard, switch view to plain text mode 

My problem is the connection from the Open files and how to dump them into the newly created "out.prn"

Ideas?