qtk/src/app/main.cpp

29 lines
1.1 KiB
C++
Raw Normal View History

2021-09-03 16:56:57 +00:00
/*##############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2023 Shaun Reed, all rights reserved ##
2022-03-07 13:20:32 +00:00
## About: Main program for practice using Qt6 widgets and OpenGL ##
2021-09-03 16:56:57 +00:00
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################*/
#include <QApplication>
#include "qtkmainwindow.h"
#include "qtkscene.h"
2021-09-03 16:56:57 +00:00
2022-11-24 22:26:53 +00:00
int main(int argc, char * argv[]) {
Q_INIT_RESOURCE(resources);
2021-09-03 16:56:57 +00:00
QApplication a(argc, argv);
auto window = MainWindow::getMainWindow();
// Qtk currently uses the decorator pattern to save / load scenes.
// This is a temporary solution and will be improved in the future.
auto emptyScene = new Qtk::SceneEmpty;
window->getQtkWidget()->setScene(new QtkScene(emptyScene));
2021-09-03 16:56:57 +00:00
window->show();
2022-11-24 22:26:53 +00:00
return QApplication::exec();
2021-09-03 16:56:57 +00:00
}