Actually there's a third issue as well, but those are the most serious (especially the first). The third one is that the resize-bars seems to remember their position in pixels so when switching between different DPIs (due to different monitor setups) the different views will either be extremely narrow or extremely wide.
repoview: switch to QTreeView which is suitable for row-based data (refs #3690)
It seems that QTableView is designed for cell-based data, but our repository
model is row-based, so QTreeView would be better choice. Also, the doc of
QListView says "This view does not display horizontal or vertical headers;
to display a list of items with a horizontal header, use QTreeView instead."
This can eliminate the hard-coded row height, which means the view can enlarge
the height if the font is larger than 20px.
setSelectionBehavior() is removed because it is the default of QTreeView.
It's windows 8.1, dpi set to 200%, multi-monitor dpi, the other monitor is 150%, the font is the default Windows 8.1 font (you don't seem to be allowed to change it anymore!) which I believe is Segoe WP.
repomodel: make sure to use screen-compatible metrics for labels (refs #3690)
It appears that QFontMetrics(font) does not always reflect the monitor dpi on
I guess painter.fontMetrics() is the best way to obtain device-dependent
metrics, but it cannot be used since we need to calculate the size of QPixmap
prior to painting. The doc says "if the paintdevice is 0, the metrics will
be screen-compatible," so QFontMetrics(font, None) should be the same as
Special thanks to Tom Whittock for his debugging support.