Hello community!
I’m programming a software for an American Football team where they can manage their formations and plays. It draws everything with QPainter into a self-programmed render widget and it can use it to create PNGs, JPEGs etc.
For a good looking UI I heard of QListWidget and QListWidgetItem to show a list of the saved formations and plays. The icons you can add in QListWidgetItem are useful to show a little picture of the play so that you know immediately what play it is. The list itself only shows small picture and formation/play’s name.
The problem:
According to QListWidgetItem Reference [qt-project.org] /qlistwidgetitem.html#setData you can only store one information which is a QVariant. But as informations I need the following:
Players (Positions in x and y and if Player is QB, RB, LB etc.)
Players’ routes
Formation/Play’s name
Formation/Play’s notes
Play style (offense, defense, special)
Picture of formation/play (rendered with QPainter)
When I double-click the item or single-click it and press a button the play should be displayed in my render-widget which also contains the above informations.
Is there a way to save all these informations in QListWidgetItem? I’d like to avoid synchronizing QStringList in QListWidget and QList<Formation*>
lg enforcer
↧