GSoC 2019 : Week 2 - TreeView with a model using QAbstractItemModel
This blog post provides a brief report on the work I have done in the second week in the coding period of the Google Summer of Code program
Work Planned to be Done:
- Construct a model using a QAbstractItemModel.
- Make a Resource file to handle the data provided to make a treeView resembling a Palette.
- Construct a Model using the .xml file containing all the Palette Items.
Construction of a TreeView with a model using the QAbstractItemModel.
I created the model using the QAbstractItemModel as mentioned on the previous blog since QStandardItemModel will not provide the logic for each of the palette Items and also due to its flexibility. Here, I used a .txt file as the data for the model and made certain changes in the way in which the treeView is displayed.
Started making a treeView along with the Palette Box.
I finally started writing the code for the treeView in the Palette Box. Unfortunately, I couldn’t make the model from the .xml (Musescore/share/workspaces/Basic.cpp) file yet. I have learned how the XML parser works and soon I will be implementing the treeView with the data provided in the .xml file as the model.
Currently, I am working on the treeView to be constructed on the Palette Box with a sample text file as a data for the model, later I will code for the treeView using the .xml file as the data for the model, which will need the class XmlReader.