I'm trying to get the widget of the foreground application at given location as below but all I get is 0. Also if I try to iterate children there is none. The foreground application can be anything the user is running e.g. Messages. On some other platforms like Mac OS X, one needs to use accessibility APIs to access UI elements of other applications but I see no such limitation documented nor I couldn't make much sense how to access QDesktopWidget as QAccessibleWidget in order to iterate through the children. Any ideas how to access arbitatary data represented by the widgets on screen?
QDesktopWidget* desktop = QApplication::desktop();
QWidget* childElement = desktop->childAt(300,300);

Reply With Quote

