<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									QString to char pointer - Qt				            </title>
            <link>https://microtechnics.ru/community/qt/qstring-to-char-pointer/</link>
            <description>Обсуждение вопросов, посвященных программированию микроконтроллеров, разработке электроники и не только.</description>
            <language>ru-RU</language>
            <lastBuildDate>Sat, 06 Jun 2026 11:30:04 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>НА: QString to char pointer</title>
                        <link>https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3462</link>
                        <pubDate>Thu, 13 Mar 2025 13:49:38 +0000</pubDate>
                        <description><![CDATA[Отлично]]></description>
                        <content:encoded><![CDATA[
<p>@aveal похоже, что для моей задачи это то, что надо.</p>
<p></p>
<p>Отлично</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/qt/">Qt</category>                        <dc:creator>Aveal</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3462</guid>
                    </item>
				                    <item>
                        <title>НА: QString to char pointer</title>
                        <link>https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3461</link>
                        <pubDate>Thu, 13 Mar 2025 13:27:36 +0000</pubDate>
                        <description><![CDATA[@aveal похоже, что для моей задачи это то, что надо.]]></description>
                        <content:encoded><![CDATA[@aveal похоже, что для моей задачи это то, что надо.]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/qt/">Qt</category>                        <dc:creator>Dima_Unx</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3461</guid>
                    </item>
				                    <item>
                        <title>НА: QString to char pointer</title>
                        <link>https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3460</link>
                        <pubDate>Thu, 13 Mar 2025 11:43:49 +0000</pubDate>
                        <description><![CDATA[Как вариант:
const char *	qPrintable(const QString &amp;str)
const wchar_t *	qUtf16Printable(const QString &amp;str)
const char *	qUtf8Printable(const QString &amp;str)
Только надо учест...]]></description>
                        <content:encoded><![CDATA[<p>Как вариант:</p>
<pre contenteditable="false">const char *	qPrintable(const QString &amp;str)
const wchar_t *	qUtf16Printable(const QString &amp;str)
const char *	qUtf8Printable(const QString &amp;str)</pre>
<p>Только надо учесть, что:</p>
<pre contenteditable="false">The char pointer will be invalid after the statement in which qPrintable() is used.
This is because the array returned by QString::toLocal8Bit() will fall out of scope.</pre>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/qt/">Qt</category>                        <dc:creator>Aveal</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3460</guid>
                    </item>
				                    <item>
                        <title>QString to char pointer</title>
                        <link>https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3459</link>
                        <pubDate>Thu, 13 Mar 2025 09:33:31 +0000</pubDate>
                        <description><![CDATA[Здравствуйте, подскажите, как можно получить из QString указатель на char*, сделал так:
QString string = &quot;string&quot;;
char* ptr = (char*)string .constData();
Но в итоге для каждого символа с...]]></description>
                        <content:encoded><![CDATA[<p>Здравствуйте, подскажите, как можно получить из QString указатель на char*, сделал так:</p>
<pre contenteditable="false">QString string = "string";
char* ptr = (char*)string .constData();</pre>
<p>Но в итоге для каждого символа строки как будто получаю 2 байта, а не один. Не очень хорошо разбираюсь в вопросе, но возможно это связано с представлением данных в Unicode/ASCII. В общем задача получить данные так, чтобы для каждого символа был один байт и сохранить эти байты в массиве.</p>]]></content:encoded>
						                            <category domain="https://microtechnics.ru/community/qt/">Qt</category>                        <dc:creator>Dima_Unx</dc:creator>
                        <guid isPermaLink="true">https://microtechnics.ru/community/qt/qstring-to-char-pointer/#post-3459</guid>
                    </item>
							        </channel>
        </rss>
		