GSoC 2020: Tree Model - Week 11

Posted 10 months ago

Hello all! This is probably my second last blog post for my GSoC project.


This week I managed to change the ScoreView to a QAbstractItemView. First I went through the chart example project for the View in the Qt documentation, and then I tried to implement it in the mscore code. I made class ScoreView inherit from QAbstractItemView, and I had to implement some virtual functions to make it work properly.

I started by implementing indexAt which tells Qt which element is there at any point, and by doing this Qt gave us tooltips for every element almost for free.


There were some visual glitches caused by this at first but I managed to fix those.

The rest of the virtual functions were based on the selection model and cursor movement, but we already have those in the ScoreView so I didn't change them just yet, and the ScoreView looks and behaves the same way as before except the tooltips.

I have created a PR for this change here:

I was trying to test screen reader accessibility but for some weird reason Orca isn't working on my Linux system, it's throwing some error like:

$ orca
22:21:26 - TIMEOUT: something has hung. Aborting.
[1] 25199 killed orca

I wasn't able to solve this yet but I'm working on it. (If anyone knows how to solve this, please leave a comment :))

Next Steps

So in the last week of GSoC I might try:
1. Trying to make Orca work with the QAbstractItemView.
2. Trying to use Qt's selection and cursor instead of the one we already have.
3. Documenting some of the code that I've written or I know about.


Previous blog:…
Pull request: