PyQt5 QListWidget – Setting Uniform Item Sizes Property
In this article we will see how we can set uniform item sizes 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 all items in the listview have the same size. This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.
In order to do this we will use setUniformItemSizes method with the list widget object. Syntax : list_widget.setUniformItemSizes(True) Argument : It takes bool as argument Return : It returns None
Below is the implementation
Please Login to comment...