Originally Posted by
ChrisW67
Well, thanks I guess but that doesn't really help me. I found references to this already and have the setting "JavascriptCanOpenWindows" in my little bunch of tweaks. But I have no idea where and how (and why) to reimplement createWindows. I tried to add stuff like this in plenty variations but I don't know where to put it and how to make it work with what I already have. Here's my MainWindow - what's left from FancyBrowser and settings added by me:
MainWindow::MainWindow(const QUrl& url)
{
QNetworkProxyFactory::setUseSystemConfiguration(true);
view = new QWebView(this);
view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanCloseWindows, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
view->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
view
->settings
()->enablePersistentStorage
(QString("/data"));
view->setContextMenuPolicy(Qt::NoContextMenu);
showFullScreen();
view->load(url);
setCentralWidget(view);
}
MainWindow::MainWindow(const QUrl& url)
{
QNetworkProxyFactory::setUseSystemConfiguration(true);
view = new QWebView(this);
view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanCloseWindows, true);
view->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
view->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
view->settings()->enablePersistentStorage(QString("/data"));
view->setContextMenuPolicy(Qt::NoContextMenu);
showFullScreen();
view->load(url);
setCentralWidget(view);
}
To copy to clipboard, switch view to plain text mode
Bookmarks