From b2a5c33763fdcbe3137be7cd1af5bf8c55b9ac26 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 10 May 2024 02:41:27 -0500 Subject: [PATCH] wip --- system/clearpilot/tools/qt_webview.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system/clearpilot/tools/qt_webview.cc b/system/clearpilot/tools/qt_webview.cc index e1b64fd..4e14bfd 100644 --- a/system/clearpilot/tools/qt_webview.cc +++ b/system/clearpilot/tools/qt_webview.cc @@ -76,14 +76,14 @@ int main(int argc, char *argv[]) { // web_view->load(QUrl(argv[1])); // layout->addWidget(web_view); - // // Set a timer to change the background color and load the URL after 0.5 seconds - // QTimer::singleShot(500, [&]() { - // QWebEngineView *web_view = new QWebEngineView(); - // window.setStyleSheet(""); // Remove the blue background - // web_view->load(QUrl(args.first())); // Load the URL - // layout->addWidget(web_view); // Add the web view to the layout - // window.update(); // Refresh window to apply changes - // }); + // Set a timer to change the background color and load the URL after 0.5 seconds + QTimer::singleShot(2000, [&]() { + QWebEngineView *web_view = new QWebEngineView(); + window.setStyleSheet(""); // Remove the blue background + web_view->load(QUrl(args.first())); // Load the URL + layout->addWidget(web_view); // Add the web view to the layout + window.update(); // Refresh window to apply changes + }); // window.showFullScreen(); window.show();