Using List Widget
To display several values in an easier and expandable format, you can use List Widget
, which is an instance of the QListWidget
class. List Widget
displays several items that can not only be viewed, but can be edited and deleted, too. You can add or remove list items one at a time from the List Widget
item, or collectively you can set list items by using its internal model.
Getting ready
Items in the list are instances of the QListWidgetItem
class. The methods provided by QListWidget
are shown in the following list:
insertItem()
: This method inserts a new item with the supplied text intoList Widget
at the specified location.insertItems()
: This method inserts multiple items from the supplied list, starting at the specified location.count()
: This method returns the count of the number of items in the list.takeItem()
: This method removes and returns items from the specified row inList Widget
.currentItem()
: This method returns the current item in the list.setCurrentItem()
: This...