Allow local/qrc content to access remote content

This commit is contained in:
ballessay 2017-04-09 15:24:50 +02:00 committed by Duncan Ogilvie
parent b7c3929d5e
commit 2bd0283e4b

View File

@ -69,6 +69,11 @@ MemoryWidget::MemoryWidget(MainWindow *main, QWidget *parent) :
ui->graphWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
ui->graphWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
// Allows the local resources (qrc://) to access http content
if (!ui->graphWebView->settings()->testAttribute(QWebSettings::LocalContentCanAccessRemoteUrls)) {
ui->graphWebView->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true);
}
// Debug console
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);