An issue with moving On Arabic letters with screen readers
-
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? -
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 ? -
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 ?@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,
-
up up up
-
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 ?
-
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 ?
@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