PyQt5 QListWidget – Resetting Vertical Scroll Bar Mode Property
In this article we will see how we can reset vertical scroll mode 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 controls how the view scroll its contents vertically. Scrolling can be done either per pixel or per item. Its default value comes from the style via the QStyle.SH_ItemView_ScrollMode style hint. It can be set with the help of
setVerticalScrollMode method. Resetting mode means it will revert back to default state.
In order to do this we will use
resetVerticalScrollMode()method with the list widget object.
Syntax : list_widget.resetVerticalScrollMode()
Argument : It takes no argument
Return : It returns None
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