From b7ac4dc7a20c624a343c946c5decd1b84eab2b82 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 8 Mar 2025 18:16:51 +0530 Subject: Basic single view browser with url input --- src/main.cpp | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) (limited to 'src/main.cpp') 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 -#include -#include -#include +#include #include -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); -- cgit v1.3.1