I would like to implement a cylinder like list. For that purpose I override QListWidget.

The way it works is: after items added (number of items must be bigger then the number of items that could be displayed in viewport) and call show() widget creates extra items (function is called in resize event), that way you get a fill of infinitum loop. Selected item is alway in the center of widget.

Example:
Viewport: 5 items
List: 10 items
Extra items: 3 at start (last 3 of the list) and 3 at the end (first 3 of the list)
When selected item is 10 item of the list, next selected item is first item of the list.

I haven't figured out how to handle the situation where there are less intems than the item that could be displayed in viewport. The consequence of that problem is after calling clear() how to handle adding items.

the only idea i have is create a list with empty items and while adding an item remove empty one.

Any advice?

PS: hope my English is understandable.