Creating accessible table control



  • Hi,
    I am a blind IT student and I would like to create a simple application using QT toolkit. I decided to use QML for basic interface declaration and then I would like to use PyQT bindings.
    My application will search in a database and then display results in a table. The application should be as much accessible for blind users as possible.
    My idea is that the user will move row by row through the table with up and down arrows, review colums with left and right arrows and eventually press enter to perform an action on selected row. Every row will display information about single object.
    I tried TableView control, I defined two TableViewColumns and used ItemDelegate to set Accessible.name to value which is infered from ListModel.
    I can see the content of the table with my screenreader, but I can not arrow through the table and select rows. Is this actually the right widget to use?
    I know I could use ListView, but I guess it won't be possible to move among columns with right and left arrows.
    Here is the code of the table:

    TableView {
                id: soundlist
                Layout.rowSpan: 5
                Accessible.name: "Seznam zvuků"
                Accessible.role: Table
                TableViewColumn {
                    role: "title"
                    title: "název"
                    Accessible.name: "Název"
                    Accessible.role: Column
                }
                TableViewColumn {
                    role: "time"
                    title: "Čas"
                    Accessible.name: "Čas"
                    Accessible.role: Column
                }
                itemDelegate: Item {
                    Text {
                        text: styleData.value
                        Accessible.name: styleData.value
                    }
                }
                ListModel {
                    id: testmodel
                    ListElement {
                        title: "prvni"
                        time: "01:08"
                    }
                    ListElement {
                        title: "Druhy"
                        time: "12:08:12"
                    }
                }
                model: testmodel
            }
        }
    }
    

    Do you have any suggestions for me? Should I use a different control? Did I use right Accessible.role for controls?
    Thank you very much.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.