Implement extend LCL TLazAccessibleObject accessibility functionality for Qt5 widgetsets.
Original Reporter info from Mantis: djenkins @dfjenkins
-
Reporter name: David Jenkins
Original Reporter info from Mantis: djenkins @dfjenkins
- Reporter name: David Jenkins
Description:
accessiblity_qt5.patch.
Like Cocoa, Qt5 has existing accessiblity implementations for the native Qt5 widgets. However, unlike Cocoa, the functionality isn't part of the widget itself but is done through interfaces attached to the widget. You can query the widget for it's accessiblity interface but cannot directly set it through the widget (must be done through a factory). Also the Qt/LCL interface is such that functions cannot be directly overridden like they can in Cocoa.
I have added new code to the cbindings for cocoa and Qt56.pas that provides access to the base accessiblity interfaces. And creates a new qt object qlclaccessiblitywidget which is an interface that allows hooking most of the accessiblity functions.
Backing is provided to TLazAccessibleObject by way of a TQtAccessibleObject(TObject) which points to a qlclaccessibilitywidget.
Like cocoa accessiblity is enabled in qt5 and code has been added to respond to TLazAccessibleObject.GetHandle requests.
I haven't had the time to do as much work on the Qt5 implementation as the Cocoa. There is no QT5_ACCESSIBLITY_ENABLE define to turn on and off accessibility. And the TQtAccessibleObject code has been placed in qtwidgets.pas instead of being separated out into it's own qtaccessibility.pas unit.