PyQt5 QListWidget – Getting Drop Indicator Position Property
In this article we will see how we can get the drop indicator position property of the QListWidget. QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list. This property holds the indicator position which is shown when drag and drop is enabled and when we drop the item at a place an indicator appears it can be turned off any time. It can be set with the help of
setDropIndicatorShown method. Position can be on item, below item or above the item it depend upon the interface.
In order to do this we will use
dropIndicatorPositionmethod with the list widget object.
Syntax : list_widget.dropIndicatorPosition()
Argument : It takes no argument
Return : It returns Indicator Position object but when printed it shows the associated value with it
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course