Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. An issue with moving On Arabic letters with screen readers
Forum Updated to NodeBB v4.3 + New Features

An issue with moving On Arabic letters with screen readers

Scheduled Pinned Locked Moved Unsolved Qt for Python
6 Posts 2 Posters 574 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MesterPerfectM Offline
    MesterPerfectM Offline
    MesterPerfect
    wrote on last edited by
    #1

    Hello,
    We are using QTextEdit To display Arabic texts.
    That text contains special letters (Arabic Diacritics) called tashkeel, which are not in the basic alphabet.
    When moving the cursor left and right to read text, the cursor skips the diacritics and doesn't focus them.
    Moving this way is important with screen readers.
    Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which version of Qt are you using ?
      On which OS ?
      Which font are you using ?
      Can you provide a minimal example that shows the behaviour ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      MesterPerfectM 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Which version of Qt are you using ?
        On which OS ?
        Which font are you using ?
        Can you provide a minimal example that shows the behaviour ?

        MesterPerfectM Offline
        MesterPerfectM Offline
        MesterPerfect
        wrote on last edited by MesterPerfect
        #3

        @SGaist said in An issue with moving On Arabic letters with screen readers:

        Hi and welcome to devnet,

        Which version of Qt are you using ?
        On which OS ?
        Which font are you using ?
        Can you provide a minimal example that shows the behaviour ?

        Hey SGaist,

        Sorry for any confusion caused earlier. I'm working with the latest version of PyQt6, 6.7.0, on a Windows system. The problem I'm encountering remains consistent across both Windows 10 and Windows 11.

        Here's a snippet of the code I'm using, which includes special letters (Arabic Diacritics) called tashkeel,

        import sys
        from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton, QDialog, QVBoxLayout, QTextEdit
        from PyQt6.QtCore import Qt, QLocale
        
        class ReadOnlyTextEdit(QTextEdit):
            def __init__(self, parent=None):
                super().__init__(parent)
                self.setReadOnly(True)
                self.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByKeyboard | Qt.TextInteractionFlag.TextSelectableByMouse)
                self.setLocale(QLocale("ar"))
                self.setAcceptRichText(True)
                self.setPlainText("تَجْرِبَةُ النَّصِّ العَرَبِيِّ مَعَ التَّشْكِيلِ")
        
        class MainWindow(QMainWindow):
            def __init__(self):
                super().__init__()
                self.setWindowTitle("Main Window")
                self.setGeometry(100, 100, 400, 300)
        
                button = QPushButton("Open Dialog", self)
                button.clicked.connect(self.open_dialog)
                button.move(150, 150)
        
                self.read_only_text_edit = ReadOnlyTextEdit(self)
                self.read_only_text_edit.setGeometry(50, 50, 300, 100)
        
            def open_dialog(self):
                dialog = QDialog(self)
                dialog.setWindowTitle("Dialog")
        
                parent_geometry = self.geometry()
                dialog_width = parent_geometry.width() / 2
                dialog_height = parent_geometry.height() / 2
                dialog.move(
                    parent_geometry.x() + parent_geometry.width() / 4,
                    parent_geometry.y() + parent_geometry.height() / 4
                )
                dialog.setFixedSize(dialog_width, dialog_height)
        
                dialog.exec()
        
        if __name__ == "__main__":
            app = QApplication(sys.argv)
            window = MainWindow()
            window.show()
            sys.exit(app.exec())
        

        Any insights on how to address this issue would be really helpful.

        Thanks,

        1 Reply Last reply
        0
        • MesterPerfectM Offline
          MesterPerfectM Offline
          MesterPerfect
          wrote on last edited by
          #4

          up up up

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Sorry, I don't have a Windows machine at hand and (AFAICS) could not reproduce that on macOS.

            Did you retry with a more recent version of PySide6 ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            MesterPerfectM 1 Reply Last reply
            0
            • SGaistS SGaist

              Sorry, I don't have a Windows machine at hand and (AFAICS) could not reproduce that on macOS.

              Did you retry with a more recent version of PySide6 ?

              MesterPerfectM Offline
              MesterPerfectM Offline
              MesterPerfect
              wrote on last edited by
              #6

              @SGaist said in An issue with moving On Arabic letters with screen readers:

              Sorry, I don't have a Windows machine at hand and (AFAICS) could not reproduce that on macOS.

              Did you retry with a more recent version of PySide6 ?

              Hi, SGaist
              I always use the latest version of pyqt6
              But the problem is still the same and I haven't found a solution yet

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved