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