diff --git a/Main.qml b/Main.qml index 29de5fe..73fa90d 100644 --- a/Main.qml +++ b/Main.qml @@ -98,8 +98,10 @@ ApplicationWindow { model: gameState.columns[parent.index].length delegate: CardModel { required property int index - card: gameState.columns[parent.index][index].card - isFaceDown: !gameState.columns[parent.index][index].revealed + property ColumnSlot col: gameState.columns[parent.index][index] + + card: col.card + isFaceDown: !col.revealed } } } diff --git a/main.cpp b/main.cpp index 50a41b6..2b3465a 100644 --- a/main.cpp +++ b/main.cpp @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) Qt::QueuedConnection); qmlRegisterUncreatableType("Solitare", 1, 0, "PlayingCard", "PlayingCard cannot be directly created in QML. Use C++ logic to instantiate."); + qmlRegisterUncreatableType("Solitare", 1, 0, "ColumnSlot", "ColumnSlot cannot be directly created in QML. Use C++ logic to instantiate."); GameState gameState; gameState.dealCards();