Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macOS - how get the native element ID of a widget?
Forum Updated to NodeBB v4.3 + New Features

macOS - how get the native element ID of a widget?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 242 Views 1 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.
  • V Offline
    V Offline
    Vadi2
    wrote on last edited by
    #1

    I need to get the native element ID of a widget on macOS in order to pass it to the accessibility framework, and it's not obvious how to do it with Qt.

    There is one example of Qt itself doing this, though it seems to use the event ID in place of the widget ID?

    JonBJ 1 Reply Last reply
    0
    • V Vadi2

      I need to get the native element ID of a widget on macOS in order to pass it to the accessibility framework, and it's not obvious how to do it with Qt.

      There is one example of Qt itself doing this, though it seems to use the event ID in place of the widget ID?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Vadi2
      I know nothing about MacOS or its "native element ID`s, but WId QWidget::winId() const is presumably what you are looking for. Maybe you can use that

      QMacAccessibilityElement *element = [QMacAccessibilityElement elementWithId: event->uniqueId()];
      

      against a widget->winId()?

      1 Reply Last reply
      2

      • Login

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