diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-09 00:15:18 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-09 00:15:18 +0530 |
| commit | 319908623e47b4e73f9af4aa4369cb895bd8df8f (patch) | |
| tree | 86d40d633bf86b5bc70876c1044ac0e030524e96 /src/play.cpp.old | |
| parent | 6d3ee55638164df6521a60b6392a26f855d5f924 (diff) | |
| download | null-browser-319908623e47b4e73f9af4aa4369cb895bd8df8f.tar.gz null-browser-319908623e47b4e73f9af4aa4369cb895bd8df8f.zip | |
Fix command input ui to fix to top
Diffstat (limited to '')
| -rw-r--r-- | src/play.cpp.old | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/play.cpp.old b/src/play.cpp.old deleted file mode 100644 index 4a61043..0000000 --- a/src/play.cpp.old +++ /dev/null @@ -1,62 +0,0 @@ -#include <QApplication> -#include <QVBoxLayout> -#include <QWidget> -#include <cef_app.h> -#include <cef_browser.h> -#include <cef_client.h> -#include <internal/cef_string.h> -#include <iostream> -#include <ostream> - -class CEFWidget : public QWidget { -public: - explicit CEFWidget(QWidget *parent = nullptr) : QWidget(parent) { - setFixedSize(400, 400); - - // TODO: Args - char *argv[] = {}; - int argc = 0; - - std::cout << "ficlk" << std::endl; - - // Create browser - CefWindowInfo window_info; - CefBrowserSettings browser_settings; - window_info.SetAsChild(winId(), {0, 0, 400, 400}); - CefBrowserHost::CreateBrowser(window_info, nullptr, "https://www.qt.io", - browser_settings, nullptr, nullptr); - } - - ~CEFWidget() { CefShutdown(); } -}; - -int main(int argc, char *argv[]) { - CefMainArgs main_args(argc, argv); - CefRefPtr<CefApp> cefApp; - int exit_code = CefExecuteProcess(main_args, cefApp, nullptr); - if (exit_code >= 0) { - return exit_code; - } - - CefMainArgs args(argc, argv); - CefSettings settings; - CefString(&settings.resources_dir_path) - .FromWString(L"/home/imsohexy/dev/projects/web-browser/build/lib/"); - CefString(&settings.locales_dir_path) - .FromWString( - L"/home/imsohexy/dev/projects/web-browser/build/lib/locales/"); - CefString(&settings.root_cache_path) - .FromWString(L"/home/imsohexy/dev/projects/web-browser/.cache/cef"); - settings.no_sandbox = true; - settings.pack_loading_disabled = true; - CefInitialize(args, settings, nullptr, nullptr); - - QApplication app(argc, argv); - QWidget mainWindow; - mainWindow.setWindowTitle("web-browser"); - QVBoxLayout layout(&mainWindow); - // CEFWidget cefWidget(&mainWindow); - // layout.addWidget(&cefWidget); - mainWindow.show(); - return app.exec(); -} |
