If multiple instances launched for Browser application, stucks at :m_profile->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
Unsolved
QtWebEngine
-
I am using QT 6.6.3 library to build Browser Application:
Browser Application developed from SimpleBrowser sample app:
If I launch single instance of this app by passing url in command line it works fine.If I launch multiple instances(around 15) with different url's at the same time, Some browser instances get stuck in at statement ```
m_profile->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);in createHiddenWindow() shared below : BrowserWindow *Browser::createHiddenWindow(const QString pageName, bool offTheRecord) { qInfo("Inside Browser::createHiddenWindow()"); if (!offTheRecord && !m_profile) { //const QString name = u"simplebrowser."_s + QLatin1StringView(qWebEngineChromiumVersion()); const QString name = pageName; m_profile.reset(new QWebEngineProfile(name)); m_profile->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); m_profile->settings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true); m_profile->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true); m_profile->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, false); QObject::connect(m_profile.get(), &QWebEngineProfile::downloadRequested, &m_downloadManagerWidget, [name](QWebEngineDownloadRequest* download) { QString path = QStringLiteral("c:\\XXX\\downloads\\"); path.append(name); path.append("\\"); download->setDownloadDirectory(QFileInfo(path).path()); download->setDownloadFileName(QFileInfo(path).fileName()); download->accept(); }); /*QObject::connect(m_profile.get(), &QWebEngineProfile::downloadRequested, &m_downloadManagerWidget, &DownloadManagerWidget::downloadRequested);*/ } auto profile = !offTheRecord ? m_profile.get() : QWebEngineProfile::defaultProfile(); auto mainWindow = new BrowserWindow(this, profile, false); m_windows.append(mainWindow); QObject::connect(mainWindow, &QObject::destroyed, [this, mainWindow]() { m_windows.removeOne(mainWindow); }); return mainWindow; } What should be the issue? How to handle this issue?