In this article we will see how we can set the flow 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. Flow tells how the list widget list will be, by default list is vertical i.e rows although by changing the flow we can make horizontal list as well.
In order to do this we will use
setFlowmethod with the list widget object.
Syntax : list_widget.setFlow(flow)
Argument : It takes flow object as 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.