PyQt5 QListWidget – Setting Batch Size
In this article we will see how we can set the batch size 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 number of items laid out in each batch if layoutMode is set to Batched. The default value is 100 although it can be changed any time.
In order to do this we will use setBatchSize method with the list widget object. Syntax : list_widget.setBatchSize(n) Argument : It takes integer as argument Return : It returns None
Below is the implementation