title: How to read/write bytes using QDataStream in PySide6
body: <p>I'm trying to read and write raw data to a QDataStream so I can serialize data for custom widgets, but in PySide6 there seems to be an issue where the documentation wrongly states that functions <code>QDataStream::readBytes</code> and <code>QDataStream::writeBytes</code> both exist, which they don't?</p>
  <p>So naturally I try to use the ones that do exist, <code>QDataStream::readRawData</code> and <code>QDataStream::writeRawData</code>. The issue is that the documentation says the signatures are <code>readRawData(length: int) -&gt; bytes</code> and <code>writeRawData(data: bytes) -&gt; None</code>.</p>
  <p>When you call the functions as the documentation suggests, it throws a TypeError because the C++ binding and native Qt signatures call for 2 arguments each, making them <code>readRawData(out: bytes, length: int) -&gt; None</code> and <code>writeRawData(data: bytes, length: int) -&gt; None</code> instead (Matching the C++ counterparts, and also matching the type stub files)?</p>
  <p>Example error:</p>
  <pre><code>...
  TypeError: 'PySide6.QtCore.QDataStream.writeRawData' called with wrong argument types:
    PySide6.QtCore.QDataStream.writeRawData(bytes)
  Supported signatures:
    PySide6.QtCore.QDataStream.writeRawData(bytes, int)
  </code></pre>
  <p>So, I naturally tried to call them following this signature, but when I do Python throws a TypeError stating I've not called them with the right amount of arguments</p>
  <p>Example Error:</p>
  <pre><code>...
      out.writeRawData(rawData, length)
  TypeError: QDataStream.writeRawData() takes exactly one argument (2 given)
  </code></pre>
  <p>I'm not sure what to do, I can't satisfy the requirements here. If anyone knows what's up please let me know, this is really peaking my curiosity. If I need to use PyQt6 instead I can do that too.</p>