PyQt5 QListWidget – Getting Auto Scroll Property
In this article we will see how we can get auto scroll 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 whether autoscrolling in drag move events is enabled. If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible. It can be set with the help of
In order to do this we will use
hasAutoScrollmethod with the list widget object.
Syntax : list_widget.hasAutoScroll()
Argument : It takes no argument
Return : It returns bool
Below is the implementation