aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp43
1 files changed, 17 insertions, 26 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8fbfee1..4f23e38 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,36 +1,27 @@
#include <QApplication>
-#include <QVBoxLayout>
-#include <QWebEngineView>
-#include <QWidget>
+#include <QMainWindow>
#include <lua.hpp>
-int main(int argc, char *argv[]) {
- auto L = luaL_newstate();
-
- luaL_openlibs(L); /* Load Lua libraries */
-
- /* Load the file containing the script we are going to run */
- auto status = luaL_dostring(L, "print(500 + 10 * 3)");
- if (status) {
- /* If something went wrong, error message is at the top of */
- /* the stack */
- fprintf(stderr, "Couldn't load file: %s\n", lua_tostring(L, -1));
- exit(1);
- }
- lua_close(L);
- exit(0);
+#include "MainWindow.hpp"
+int main(int argc, char *argv[]) {
QApplication app(argc, argv);
- QWidget mainWindow;
- mainWindow.setWindowTitle("web-browser");
-
- auto layout = new QVBoxLayout(&mainWindow);
- auto view = new QWebEngineView();
- view->setFixedSize(400, 400);
- view->setUrl(QUrl("https://ediblemonad.dev"));
- layout->addWidget(view);
+ MainWindow mainWindow;
+ mainWindow.setWindowTitle("web-browser");
mainWindow.show();
return app.exec();
}
+
+// auto L = luaL_newstate();
+//
+// luaL_openlibs(L);
+//
+// auto status = luaL_dostring(L, "print(500 + 10 * 3)");
+// if (status) {
+// fprintf(stderr, "Couldn't load file: %s\n", lua_tostring(L, -1));
+// exit(1);
+// }
+// lua_close(L);
+// exit(0);