List mods from QModListModel instead of hardcoded list

This commit is contained in:
Toast 2025-05-23 01:01:33 +02:00
parent 6061590270
commit 0a52a6fcc9
2 changed files with 3 additions and 21 deletions

View file

@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls as Controls
import org.kde.kirigami as Kirigami
import Leek
Kirigami.ApplicationWindow {
id: root
@ -11,7 +12,7 @@ Kirigami.ApplicationWindow {
title: "Mods"
Kirigami.CardsListView {
id: modsView
model: modListModel
model: QModListModel {}
delegate: modCardDelegate
}
}
@ -67,24 +68,4 @@ Kirigami.ApplicationWindow {
}
}
}
ListModel {
id: modListModel
ListElement {
name: "DivaNoSpy"
description: "Disables project diva's telemetry"
}
ListElement {
name: "exPatch"
description: "Unlocks extreme difficulty immediately"
}
ListElement {
name: "Mod with no description"
}
ListElement {
name: "Very long description"
description: "
()"
}
}
}