diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-08 18:16:51 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-08 18:16:51 +0530 |
| commit | b7ac4dc7a20c624a343c946c5decd1b84eab2b82 (patch) | |
| tree | 6e7efa381546244da8942ec023d94db634b73948 /src/main.cpp | |
| parent | ecd3ccde166910e3667b7b1a064e9c6db52d1646 (diff) | |
| download | null-browser-b7ac4dc7a20c624a343c946c5decd1b84eab2b82.tar.gz null-browser-b7ac4dc7a20c624a343c946c5decd1b84eab2b82.zip | |
Basic single view browser with url input
Diffstat (limited to '')
| -rw-r--r-- | src/main.cpp | 43 |
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); |
