Added support for sorting ListItems in a ListView

This commit is contained in:
Nav
2023-03-21 20:30:57 +00:00
parent dc241c3886
commit d7a8e0ded0
5 changed files with 59 additions and 7 deletions

View File

@@ -29,6 +29,11 @@ namespace Bloom::Widgets
this->valueText.clear();
}
bool operator < (const ListItem& rhs) const override {
const auto& rhsRegisterItem = dynamic_cast<const RegisterItem&>(rhs);
return this->registerName < rhsRegisterItem.registerName;
}
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
private: