I slightly remember some discussion on this topic for QString, however I don't find any references now and don't know how the status on this topic is.
In QtSerialBus, QByteArray is used as container for QCanBusFrame. As standard CAN 2.0 frames can consist of 8 bytes max, this would be an optimal case of storing the data directly without allocating memory. The same container, however, must be capable to store the max. 64 bytes of a CAN FD frame.
While we could think of an optimized implementation within QCanBusFrame, the better solution would be to have this optimization in QByteArray.