Accessibility for Custom Painted Items
-
I'm creating a custom widget (ChatListWidget) in Qt where multiple rows (chat items) are drawn manually using QPainter. I’ve assigned the widget the role QAccessible::List, and each row is represented by a custom QAccessibleInterface child with role ListItem.
I'm sending accessibility events (QAccessible::Focus, Selection) when the current row changes.
The issues:
- Since all rows are in a single widget, how can I properly focus a specific row so the screen reader reads it?
- Screen readers only announce the initial row, not subsequent ones on navigation.
- What's the correct way to notify screen readers to read custom painted list items?
-
Hi and welcome to devnet,
Something is not clear: are you creating a full custom widget ? It seems so but since Qt provides the base classes to create your own custom views within the model view set of classes, it would be good to clarify that first.