tsp/main.cpp

38 lines
725 B
C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <format>
#include "renderwindow.h"
#include <QApplication>
#include <QWidget>
#include <SDL2/SDL.h>
#include <qtimer.h>
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
SDL_InitSubSystem(SDL_INIT_VIDEO);
if((SDL_Init(SDL_INIT_VIDEO) == -1)) {
std::cerr << "Error initializing SDL: " << SDL_GetError() << std::endl;
return EXIT_FAILURE;
}
auto window = std::make_shared<RenderWindow>();
window->show();
int res = QApplication::exec();
if (res != 0) {
std::cerr << "QApplication::exec() returned " << res << std::endl;
}
SDL_Quit();
return EXIT_SUCCESS;
}