what would the pseudocode of the qml look like
Well, there's where you've reached the limit of my knowledge. I've never written any serious code using the QML / QtQuick framework. Everything I do is QWidget-based desktop apps.

Maybe someone else with more experience can jump in.