QListView Drop Indicator Modeling

I use QListView to show a list of items that I can drag to rearrange them. The problem is that:

  • the drop indicator is a very small line (1px thick)
  • the drop area is so narrow, so you need to be really accurate to correctly drop an element between two other elements.

I wonder if the QListView drop indicator can be styled so that the line is thicker and the drop area is wider.

+4
source share
1 answer

The style of the fall indicator can be changed using QStyle. QStyle::PE_IndicatorItemViewItemDrop the enum value matches it and can be used to set the style for the indicator, which is drawn to show where the item in the item view will be deleted during the drag operation in the position view

0
source

All Articles