QT5: ListView ignores vertical scroll bar when calculating column width.
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
When List View has a vertical Scroll bar, the right hand side of the control is obscured. Both the cells and column header are affected. While its possible to pad out the text with trailing spaces, the Sort Indicator pop up on the far right of the column header is always affected.
Steps to reproduce:
The problem is most easily demonstrated using Sort Indicators but thats not the extent of the problem. If the text in the cells occupies the whole cell, for example if the right hand column's width is auto adjusted, several characters are hidden.
To demo using Sort Indicator, drop a ListView on a form, set some values in FormCreate() -
ListView1.AutoSort:=True;
ListView1.AutoSortIndicator := True;
ListView1.Column[0].SortIndicator := siDescending; // siDescending; siAscending
ListView1.SortColumn := 0;
ListView1.Column[0].Caption:= 'A nice list';
ListView1.SortType:= stBoth;
ListView1.ViewStyle:= vsReport;
ListView1.ReadOnly := True;
ListView1.ScrollBars := ssVertical;
(Most of that is to get sort indicator displayed ...)
Run it. See the Sort Indicator in column header, right hand side ? Remove the scroll bar and you can see all of the Sort Indicator.
As I mentioned, this problem affects text in the control's cells as well. Most easly demo'ed with multiple columns and the right hand one set to auto width.
Mantis conversion info:
- Mantis ID: 38394
- OS: Linux
- OS Build: U18.04
- Build: 64416
- Platform: x86_64
- Version: 2.1 (SVN)
- Monitored by: » @davidbannon (David)