The name and version number of your compiler : VS2017 / GCC9
Qt version : 5.12.9
The name and version number of your operating system: Windows 10 and Ubuntu 16.04 LTS
Please refer the attached test app & screenshot TreeViewModel.zipwhich contains TreeView and QStandardItemModel.
QStandardItemModel , sets two roles ,
m_roles[Qt::UserRole] = "index";
m_roles[Qt::UserRole + 1] = "one";
TreeView has two columns with above role names
If we click on any row in Treeview , previous row looks to be selected as row highlighter appear for previous row.
Expected behavior: Clicked row should be selected
Actual behavior : Clicked row and row selection is off by one