When I say MyListWidget->clear() it crashes if there's an item selected (if it's fresh and an item hasn't been clicked yet it works).
When I create a command that goes MyListWidget->takeItem(0) it removes the top item (like it should) and then when there's one item left it crashes when it tries to remove it.
If I don't select anything in the listwidget at all during the course of the program, the command is able to remove the last item safely.
What's going on here? I think clear() worked in my program a short time ago, and now it seems to have this strange issue. How do I fix this issue and make the listwidget clearable?
Bookmarks