This commit is contained in:
Your Name
2024-05-10 02:58:43 -05:00
parent 9d52518361
commit 6417108386

View File

@@ -20,10 +20,10 @@ class WebViewFrame : public QFrame {
Q_OBJECT
public:
explicit WebViewFrame(QWidget *parent = nullptr) : QFrame(parent) {
// QVBoxLayout *layout = new QVBoxLayout(this);
// QWebEngineView *web_view = new QWebEngineView();
// web_view->load(QUrl("http://example.com")); // Change URL as needed
// layout->addWidget(web_view);
QVBoxLayout *layout = new QVBoxLayout(this);
QWebEngineView *web_view = new QWebEngineView();
web_view->load(QUrl("http://example.com")); // Change URL as needed
layout->addWidget(web_view);
}
};
@@ -36,11 +36,14 @@ public:
this->setStyleSheet("background-color: black;");
this->showFullScreen();
WebViewFrame *webViewFrame = new WebViewFrame(this);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(webViewFrame);
this->setLayout(mainLayout);
this->show();
QTimer::singleShot(2000, [&]() {
WebViewFrame *webViewFrame = new WebViewFrame(this);
mainLayout->addWidget(webViewFrame);
});
}
};