wip
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user