<div dir="ltr"><div dir="ltr"><div>Hi,<br></div>Here it is:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.1pt"><span style="color:rgb(148,85,141)">self</span>.plainTextEdit = QtWidgets.QPlainTextEdit(<span style="color:rgb(148,85,141)">self</span>)<br><span style="color:rgb(148,85,141)">self</span>.plainTextEdit.setLayoutDirection(QtCore.Qt.RightToLeft)<br><span style="color:rgb(148,85,141)">self</span>.plainTextEdit.setLocale(QtCore.QLocale(QtCore.QLocale.Persian, QtCore.QLocale.Iran))<br><span style="color:rgb(148,85,141)">self</span>.plainTextEdit.setReadOnly(<span style="color:rgb(0,0,128);font-weight:bold">True</span>)<br><span style="color:rgb(148,85,141)">self</span>.plainTextEdit.setObjectName(<span style="color:rgb(0,128,128);font-weight:bold">"plainTextEdit"</span>)<br><span style="color:rgb(148,85,141)">self</span>.retranslateUi(<span style="color:rgb(148,85,141)">self</span>)<br><span style="color:rgb(148,85,141)">self</span>.plainTextEdit.appendPlainText(<span style="color:rgb(0,128,128);font-weight:bold">"من پایتون را دوست دارم"</span>)</pre></blockquote></blockquote><div>There is no option to set text alignment or maybe there is another option which I do not no about it.<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 5, 2018 at 1:51 AM Maurizio Berti <<a href="mailto:maurizio.berti@gmail.com">maurizio.berti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Please, Maziar: context.</div>If you don't tell us *how* you're trying to do anything, it's impossible for us to help you.</div><div dir="ltr">Just writing "it doesn't work" is meaningless.<div><br>Anyway, in case you're using QWidget.setLayoutDirection, as the documentation says:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This method no longer affects text layout direction since Qt 4.7.</blockquote><div>(source: <a href="http://doc.qt.io/qt-5/qwidget.html#layoutDirection-prop" target="_blank">http://doc.qt.io/qt-5/qwidget.html#layoutDirection-prop</a> )</div><div><br></div><div>Have a look at QTextOption and its methods setTextDirection() and setAlignment().</div><div><br>Maurizio</div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno gio 4 ott 2018 alle ore 19:44 Maziar Parsijani <<a href="mailto:maziar.parsijani@gmail.com" target="_blank">maziar.parsijani@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi,<br></div>I want to use QPlainTextEdit for my right to left text but it doesn't support it to align right my text .<br></div></div>
_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-321973684071873032m_6929919605080866370gmail_signature" data-smartmail="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>
</blockquote></div>