This commit is contained in:
Your Name
2024-05-10 03:05:02 -05:00
parent 6417108386
commit ad3a0476e9

View File

@@ -38,12 +38,16 @@ public:
QVBoxLayout *mainLayout = new QVBoxLayout(this);
this->setLayout(mainLayout);
this->show();
QTimer::singleShot(2000, [&]() {
WebViewFrame *webViewFrame = new WebViewFrame(this);
WebViewFrame *webViewFrame = nullptr; // Declare pointer but do not initialize
QTimer::singleShot(2000, this, [=, &webViewFrame]() mutable {
webViewFrame = new WebViewFrame(this); // Initialize here
mainLayout->addWidget(webViewFrame);
});
this->show();
}
};