1
0

feat: show last selected round

This commit is contained in:
2026-06-05 17:29:34 +08:00
parent 4e30e939ce
commit 2fca74c690
2 changed files with 13 additions and 2 deletions
@@ -15,7 +15,8 @@ Rectangle {
required property SqlLeaderboardModel leaderboard
required property ListModel rounds
property QtObject selectedRound
property QtObject selectedRound: rounds.get(0)
property bool selected: false
signal roundSelected()
@@ -52,6 +53,16 @@ Rectangle {
textRole: "name"
}
Text {
Layout.alignment: Qt.AlignHCenter
font.pixelSize: UIStyle.fontSizeM
color: UIStyle.textColor
visible: root.selected
text: "Last selected: " + selectedRound.name
}
Button {
Layout.alignment: Qt.AlignHCenter
@@ -63,6 +74,7 @@ Rectangle {
onClicked: {
root.selectedRound = rounds.get(roundSelect.currentIndex)
root.selected = true
roundSelected()
}
}