PyQt5 QListWidget – Setting Word Wrap
In this article we will see how we can word wrap 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 item text word-wrapping policy. If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is false by default.
In order to do this we will use setWordWrap method with the list widget object. Syntax : list_widget.setWordWrap(True) Argument : It takes bool as argument Return : It returns None
Below is the implementation
My Personal Notes arrow_drop_up
Please Login to comment...