diff options
| author | Aotrix <[email protected]> | 2026-07-13 00:23:36 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-07-13 00:23:36 +0200 |
| commit | 552017342ed077ec9a516b02ea4b6855a7c17007 (patch) | |
| tree | aca50984a334049392cd0d3eb8e4c4efe65a2909 /gameView | |
| parent | a0632d299b85dc4ef7c0e03898f38e6deca0edc2 (diff) | |
Added test file for Token
Diffstat (limited to 'gameView')
| -rw-r--r-- | gameView/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gameView/main.cpp b/gameView/main.cpp index 5b3a1ae..193fbed 100644 --- a/gameView/main.cpp +++ b/gameView/main.cpp @@ -10,7 +10,7 @@ #include <qtoolbar.h> #include <qwidget.h> -void configureMainMenuBar(QMenuBar &iMenuBar) { +void configureMainMenuBar(QMenuBar &iMenuBar, QWidget &iWindow) { QMenu *aOpenMenu = iMenuBar.addMenu("File"); aOpenMenu->addAction("Open JSON file", [] { QFileDialog aFileDialog; @@ -26,6 +26,7 @@ void configureMainMenuBar(QMenuBar &iMenuBar) { std::cout << kFilePaths[0].toStdString(); } }); + aOpenMenu->addAction("Quit", [&iWindow] { iWindow.close(); }); } int main(int argc, char *argv[]) { @@ -37,11 +38,12 @@ int main(int argc, char *argv[]) { QGridLayout aLayout(&aWindow); QMenuBar aMenuBar; - configureMainMenuBar(aMenuBar); + configureMainMenuBar(aMenuBar, aWindow); QListWidget aListOfCards; aListOfCards.insertItem(0, "first card"); aListOfCards.insertItem(1, "second card"); + aListOfCards.insertItem(2, "third card"); aLayout.addWidget(&aMenuBar, 0, 0); aLayout.addWidget(&aListOfCards, 1, 0); |
