Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 19 files). Show all
Unified · Split
| @@ -79,7 +79,11 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid · 78 unmodified lines | ||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | _webView->setPage(new DataWebPage()); |
| 82 | − _webView->setUrl(url); | |
| 82 | + if (!url.startsWith("http")) { | |
| 83 | + _webView->setUrl(QUrl::fromLocalFile(url)); | |
| 84 | + } else { | |
| 85 | + _webView->setUrl(url); | |
| 86 | + } | |
| 83 | 87 | |
| 84 | 88 | connect(this, &WebWindowClass::destroyed, _windowWidget, &QWidget::deleteLater); |
| 85 | 89 | connect(_webView->page()->mainFrame(), &QWebFrame::javaScriptWindowObjectCleared, |