<?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[align to right]]></title><description><![CDATA[<p dir="auto">Can somebody   <strong>PLEASE suggest</strong> how to align the "appendPlainText " text to the right ?</p>
<pre><code>   if(m_TAB_Connect)
    {
        // pass to debug window
        text = "Serial port      ";
        text += m_currentSettings.name;
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);

        text = "Baud rate       ";
        text += QString::number(m_currentSettings.baudRate);
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);
        text = "Data bits       ";
        text += QString::number(m_currentSettings.baudRate);
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);

        text = "Parity         ";
        text += QString::number(m_currentSettings.baudRate);
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);

        text = "Stop bits       ";
        text += m_ui-&gt;parityBox-&gt;currentText();
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);

        text = "Flow control    ";
        text += m_ui-&gt;flowControlBox-&gt;currentText();
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);




    }
    else
    {

    }
</code></pre>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/6ba7bf5f-f239-43ee-b4a0-55dce0b2db26.png" alt="ce1e0cf1-da01-4592-93f5-e7dd200f99c2-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.qt.io/topic/156308/align-to-right</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 05:17:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/156308.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Apr 2024 16:33:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to align to right on Thu, 25 Apr 2024 18:07:31 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch SOLVED</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/e07625db-c311-4fa2-ac43-7765ea5f8f2b.png" alt="5bf6bc92-6cce-470c-8fc2-e342dbcd01dc-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/798033</link><guid isPermaLink="true">https://forum.qt.io/post/798033</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 25 Apr 2024 18:07:31 GMT</pubDate></item><item><title><![CDATA[Reply to align to right on Thu, 25 Apr 2024 17:54:12 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch ADDENDUM</p>
<p dir="auto">I think I found the  solution, it needs tweaking...</p>
<pre><code>    // BUG runs twice  ??
    if(m_TAB_Connect)
    {
        // pass to debug window
        text = "Serial port      ";
        int TextLenght = text.size();

        text += m_currentSettings.name;
        m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);

        int FullTextLenght = text.size();
        if( FullTextLenght &gt;TextLenght  )
         {
            // BUG process
            text = "  BUG process    ";

            text = "Baud rate       ";
            QString Temp =  QString::number(m_currentSettings.baudRate);

TODO HERE 
            Temp = Temp.rightJustified(FullTextLenght," ");''

TODO HERE 
            text += Temp;
            //text += QString::number(m_currentSettings.baudRate);
            m_TAB_Connect-&gt;ui-&gt;plainTextEdit-&gt;appendPlainText(text);
            QString s = "apple";
            QString t = s.rightJustified(8, '.');    // t == "...apple"


        }

</code></pre>
]]></description><link>https://forum.qt.io/post/798032</link><guid isPermaLink="true">https://forum.qt.io/post/798032</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 25 Apr 2024 17:54:12 GMT</pubDate></item><item><title><![CDATA[Reply to align to right on Thu, 25 Apr 2024 17:29:34 GMT]]></title><description><![CDATA[<p dir="auto">You are appending plain text. The word plain implies that it can’t be formatted. See <a href="https://doc.qt.io/qt-6/qplaintextedit.html#appendHtml" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>, how it works. Reading documentation is always good.</p>
]]></description><link>https://forum.qt.io/post/798029</link><guid isPermaLink="true">https://forum.qt.io/post/798029</guid><dc:creator><![CDATA[Axel Spoerl]]></dc:creator><pubDate>Thu, 25 Apr 2024 17:29:34 GMT</pubDate></item><item><title><![CDATA[Reply to align to right on Thu, 25 Apr 2024 17:14:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hskoglund">@<bdi>hskoglund</bdi></a> Whops,,, wrong description on my part<br />
I need this<br />
Serial port    portUSB0<br />
Baud rate        align             110</p>
<p dir="auto">align the value  (110 ) with  (portUSB0) on the right ( so the zeros are in same location - in this example )   , BUT  "it"  won't let me to type it in aligned...</p>
<p dir="auto">I thing I need  to count the characters , get maximum count and then... what ?</p>
]]></description><link>https://forum.qt.io/post/798027</link><guid isPermaLink="true">https://forum.qt.io/post/798027</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 25 Apr 2024 17:14:08 GMT</pubDate></item><item><title><![CDATA[Reply to align to right on Thu, 25 Apr 2024 16:47:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi, right-aligning I think does not help so much:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/1d02799e-bb51-4e6b-9df8-8da537a3a454.png" alt="Screenshot 2024-04-25 at 18.40.23.png" class=" img-fluid img-markdown" /> Instead, perhaps you need to split them into 2 columns.</p>
]]></description><link>https://forum.qt.io/post/798026</link><guid isPermaLink="true">https://forum.qt.io/post/798026</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Thu, 25 Apr 2024 16:47:02 GMT</pubDate></item></channel></rss>