<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Am I misunderstanding or misusing QByteArray::toHex()?]]></title><description><![CDATA[<p dir="auto">I have a</p>
<pre><code>char[32] data;
</code></pre>
<p dir="auto">populated with some data and its bytes increment from 0x00 to 0xff one after another over the course of the algorithm. When I call</p>
<pre><code>auto hex = QByteArray(data).toHex();
</code></pre>
<p dir="auto">every time hex contains an empty array regardless of the increments of data bytes.</p>
<p dir="auto">What's the trick?</p>
]]></description><link>https://forum.qt.io/topic/120008/am-i-misunderstanding-or-misusing-qbytearray-tohex</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 12:08:42 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/120008.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Oct 2020 13:23:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Am I misunderstanding or misusing QByteArray::toHex()? on Fri, 16 Oct 2020 13:29:11 GMT]]></title><description><![CDATA[<p dir="auto">If first element in <code>data</code> is <code>0x00</code> then <code>QByteArray(data)</code> will be empty (it assumes a null terminated string). Pass the size as a second parameter.</p>
]]></description><link>https://forum.qt.io/post/622595</link><guid isPermaLink="true">https://forum.qt.io/post/622595</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Fri, 16 Oct 2020 13:29:11 GMT</pubDate></item></channel></rss>