Ah, see, that makes it even simplier 
While you still need to gather that information in C++, you can now just export the final values via setContextProperty().
At some place in your C++ code you are loading the main QML file, probably using a QQuickWindow or a QQuickView.
Both have a "root context" which basically holds "global variables".
You can add values to that by calling setContextProperty(), providing a name (to be used in QML) and the value (in your case the two numbers you've just gathered).
Something like this:
int totalHorizontalGames = ....;
QQuickView view;
view.rootContext()->setContextProperty("_totalHorizontalGamesCount", totalHorizontalGames);
view.setSource(...);
int totalHorizontalGames = ....;
QQuickView view;
view.rootContext()->setContextProperty("_totalHorizontalGamesCount", totalHorizontalGames);
view.setSource(...);
To copy to clipboard, switch view to plain text mode
and anywhere in QML
Text {
text: "Total number of Horizontal games: " + _totalHorizontalGamesCount
}
Text {
text: "Total number of Horizontal games: " + _totalHorizontalGamesCount
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks