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,8 +102,8 @@ void FlowWidget::clearLayout()
if (flowLayout != nullptr) {
QLayoutItem *item;
while ((item = flowLayout->takeAt(0)) != nullptr) {
item->widget()->deleteLater(); // Delete the widget
delete item; // Delete the layout item
delete item->widget(); // Delete the widget
delete item; // Delete the layout item
}
} else {
if (scrollArea->horizontalScrollBarPolicy() != Qt::ScrollBarAlwaysOff &&