Fill a QTableView
-
Hi!
In my football application I want to give the opportunity to view the championship standings in a given range of days.
In the database I only have the general classification, but I can easily get all the information (teams / points / v / n / p / goal scored / etc) from the sql table relating to the championship calendar.
I thought of an array of structures. Other ideas?

Eventually how do I connect it to the table?
Thanks
-
Hi!
In my football application I want to give the opportunity to view the championship standings in a given range of days.
In the database I only have the general classification, but I can easily get all the information (teams / points / v / n / p / goal scored / etc) from the sql table relating to the championship calendar.
I thought of an array of structures. Other ideas?

Eventually how do I connect it to the table?
Thanks
-
Hi!
In my football application I want to give the opportunity to view the championship standings in a given range of days.
In the database I only have the general classification, but I can easily get all the information (teams / points / v / n / p / goal scored / etc) from the sql table relating to the championship calendar.
I thought of an array of structures. Other ideas?

Eventually how do I connect it to the table?
Thanks
@AndreaCT said in Fill a QTableView:
but I can easily get all the information (teams / points / v / n / p / goal scored / etc) from the sql table relating to the championship calendar.
Can't you just use
QSqlQueryModeldirectly without any overhead? -
@VRonin said in Fill a QTableView:
Can't you just use QSqlQueryModel directly without any overhead?
I get the information from the database, but not directly. I do multiple queries: the first one scans all the teams, the second one selects the matches and results of the current team and obtains the informations.