Apr-10-2023, 02:52 AM
(This post was last modified: Apr-14-2023, 01:30 AM by deanhystad.)
Post the entire error message. Including the trace. You should not force others to read your code when you can easily provide a concise description of what the error is and where it happened.
The error is very clear. It expects an iterable(str), and you are passing a str. Do you have an iterable thing (like a list perhaps) of strs? You do.
The error is very clear. It expects an iterable(str), and you are passing a str. Do you have an iterable thing (like a list perhaps) of strs? You do.
self.listWidget.addItems(fruits)If you really want to use a list to add items one at a time, you can use self.labelWidget.addItem(str).