title: How to align QPlainTextEdit to right?
body: <p>I want to write a notepad in python with PyQt5 for persian language.
  how can I align the thext in QPlainTextEdit to right?
  this is my code:</p>
  
  <pre><code>from PyQt5.QtWidgets import QApplication, QMainWindow, QPlainTextEdit
  from PyQt5.QtCore import Qt, QLocale
  
  class TextBox(QPlainTextEdit):
      def persian(self):
          self.setFixedSize(640, 480)
  
          self.setLayoutDirection(Qt.RightToLeft)
          self.setLocale(QLocale(QLocale.Persian, QLocale.Iran))
  
  
  class MainWindow(QMainWindow):
      def __init__(self):
          super().__init__()
          self.GUI()
  
      def GUI(self):
          self.setWindowTitle("My title")
          self.setFixedSize(640, 480)
  
          self.text = TextBox(self)
          self.text.persian()
  
  
  app = QApplication([])
  window = MainWindow()
  window.show()
  
  app.exec_()
  </code></pre>