Fix Windows FlowWidget duplication

- Delete the item widget right away, as the delay is too great with deleteLater
This commit is contained in:
ZeldaZach 2025-01-13 22:58:29 -05:00
parent 497e4f1be0
commit 67b4fa7d49
No known key found for this signature in database

View file

@ -102,7 +102,7 @@ void FlowWidget::clearLayout()
if (flowLayout != nullptr) { if (flowLayout != nullptr) {
QLayoutItem *item; QLayoutItem *item;
while ((item = flowLayout->takeAt(0)) != nullptr) { while ((item = flowLayout->takeAt(0)) != nullptr) {
item->widget()->deleteLater(); // Delete the widget delete item->widget(); // Delete the widget
delete item; // Delete the layout item delete item; // Delete the layout item
} }
} else { } else {