[PyQt] [PYQT5]BUG in QtWidgets.QPlainTextEdit
Maziar Parsijani
maziar.parsijani at gmail.com
Fri Oct 5 09:20:50 BST 2018
Hi,
I have read it and it says that it is not support for this purpose so I
think this is a kind of problem in pyqt.
On Fri, Oct 5, 2018 at 10:23 AM Maurizio Berti <maurizio.berti at gmail.com>
wrote:
> Have you read about QTextOption as I wrote?
>
> Il giorno ven 5 ott 2018 alle ore 08:48 Maziar Parsijani <
> maziar.parsijani at gmail.com> ha scritto:
>
>> Hi,
>> Here it is:
>>
>>> self.plainTextEdit = QtWidgets.QPlainTextEdit(self)
>>>> self.plainTextEdit.setLayoutDirection(QtCore.Qt.RightToLeft)
>>>> self.plainTextEdit.setLocale(QtCore.QLocale(QtCore.QLocale.Persian, QtCore.QLocale.Iran))
>>>> self.plainTextEdit.setReadOnly(True)
>>>> self.plainTextEdit.setObjectName("plainTextEdit")
>>>> self.retranslateUi(self)
>>>> self.plainTextEdit.appendPlainText("من پایتون را دوست دارم")
>>>>
>>>> There is no option to set text alignment or maybe there is another
>> option which I do not no about it.
>>
>> On Fri, Oct 5, 2018 at 1:51 AM Maurizio Berti <maurizio.berti at gmail.com>
>> wrote:
>>
>>> Please, Maziar: context.
>>> If you don't tell us *how* you're trying to do anything, it's impossible
>>> for us to help you.
>>> Just writing "it doesn't work" is meaningless.
>>>
>>> Anyway, in case you're using QWidget.setLayoutDirection, as the
>>> documentation says:
>>>
>>> This method no longer affects text layout direction since Qt 4.7.
>>>
>>> (source: http://doc.qt.io/qt-5/qwidget.html#layoutDirection-prop )
>>>
>>> Have a look at QTextOption and its methods setTextDirection()
>>> and setAlignment().
>>>
>>> Maurizio
>>>
>>> Il giorno gio 4 ott 2018 alle ore 19:44 Maziar Parsijani <
>>> maziar.parsijani at gmail.com> ha scritto:
>>>
>>>> Hi,
>>>> I want to use QPlainTextEdit for my right to left text but it doesn't
>>>> support it to align right my text .
>>>> _______________________________________________
>>>> PyQt mailing list PyQt at riverbankcomputing.com
>>>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>>
>>>
>>>
>>> --
>>> È difficile avere una convinzione precisa quando si parla delle ragioni
>>> del cuore. - "Sostiene Pereira", Antonio Tabucchi
>>> http://www.jidesk.net
>>>
>>
>
> --
> È difficile avere una convinzione precisa quando si parla delle ragioni
> del cuore. - "Sostiene Pereira", Antonio Tabucchi
> http://www.jidesk.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181005/0800603c/attachment.html>
More information about the PyQt
mailing list