A vertical space extended QTreeView.
The last row in default QTreeView always stays on bottom, this little project extends the vertical space so the view can be scrolled until last row hit the top of view. Which behaves like modern text editor that has virtual space enabled after last line.
Qt5.py is required. Or modify the scripts to use your Python Qt binding.
cd qoverview
python -m example
# your widget
class MyView(QtWidgets.QTreeView):
...
👇
# your widget, but superclass replaced
class MyView(qoverview.VerticalExtendedTreeView):
...
See paintEvent
and you should get the picture.
- Scroll mode must be
ScrollPerPixel
. - Size adjust policy must be
AdjustIgnored
. - Row height must be uniformed.
Scroll bar may flicker during window resizing.
Currently only QTreeView extended, would be great to extend all QAbstractItemView subclasses. If it's possible.