Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Store information for screen readers at QAction
QtWS25 Last Chance

Store information for screen readers at QAction

Scheduled Pinned Locked Moved Unsolved Qt 6
3 Posts 2 Posters 274 Views
  • 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.
  • P Offline
    P Offline
    PythonQTMarlem
    wrote on last edited by
    #1

    Hello,
    I program with PyQt6.
    I code a menu:

    menubar = self.menuBar()
    
    file_menu = menubar.addMenu('Datei')
    
    translate_action = QAction('Eingegebener Text übersetzen', self)
    translate_action.setShortcut(QKeySequence("Alt+t"))
    translate_action.triggered.connect(self.translate_text)
    file_menu.addAction(translate_action)
    
    exit_action = QAction('Beenden', self)
    exit_action.triggered.connect(self.close)
    file_menu.addAction(exit_action)
    

    I would like to add text to the menu items for screen readers.
    But QAction has no setAccessibleName methods
    Or setAccessibleDescription .
    Ask:
    Is there another possibility?

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

      Hi,

      If memory serves well, QMenu is already equipped for that so you should not need to do anything special with your QAction.

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

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        If memory serves well, QMenu is already equipped for that so you should not need to do anything special with your QAction.

        P Offline
        P Offline
        PythonQTMarlem
        wrote on last edited by
        #3

        @SGaist okay. Thank you for your fast answer.

        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