-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (20 loc) · 811 Bytes
/
main.cpp
File metadata and controls
27 lines (20 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <QApplication>
#include "startwindow.h"
#include "characterselectionwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
StartWindow startWindow;
// Quando o botão "Iniciar Jornada" é clicado, exibe a janela de seleção de personagens
QObject::connect(&startWindow, &StartWindow::selectCharacterButtonClicked, [&]() {
startWindow.hide(); // Esconde a tela inicial
// Exibe a janela de seleção de personagens
startWindow.characterSelectionWindow.show();
});
// Quando o botão "Sair" é clicado, fecha o aplicativo
QObject::connect(&startWindow, &StartWindow::quitButtonClicked, &a, &QApplication::quit);
// Exibe a tela inicial
startWindow.show();
// Inicia o loop de eventos do Qt
return a.exec();
}