This commit is contained in:
Your Name
2024-05-10 02:28:08 -05:00
parent 0c94874344
commit 63c5de263a

View File

@@ -38,7 +38,7 @@ int main(int argc, char *argv[]) {
// Common init
QWidget window;
window.setWindowTitle("Generic Window");
window.setStyleSheet("background-color: black;");
window.setStyleSheet("background-color: blue;");
window.showFullScreen();
auto windowHandle = window.windowHandle();
@@ -65,8 +65,16 @@ int main(int argc, char *argv[]) {
// QString url = args.first();
QWebEngineView *web_view = new QWebEngineView();
web_view->load(QUrl(argv[1]));
layout->addWidget(web_view);
// 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, [&]() {
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();