mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Update style of webview to only be set when 'fusion' exists
This commit is contained in:
parent
6087a3e8a9
commit
547b0e5ee6
1 changed files with 5 additions and 2 deletions
|
@ -47,7 +47,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
|
|||
dockWidget->setFeatures(QDockWidget::DockWidgetMovable);
|
||||
|
||||
_webView = new QWebView(dockWidget);
|
||||
_webView->setStyle(QStyleFactory::create("fusion"));
|
||||
addEventBridgeToWindowObject();
|
||||
|
||||
dockWidget->setWidget(_webView);
|
||||
|
@ -66,7 +65,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
|
|||
dialogWidget->setLayout(layout);
|
||||
|
||||
_webView = new QWebView(dialogWidget);
|
||||
_webView->setStyle(QStyleFactory::create("fusion"));
|
||||
|
||||
layout->addWidget(_webView);
|
||||
|
||||
|
@ -75,6 +73,11 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
|
|||
_windowWidget = dialogWidget;
|
||||
}
|
||||
|
||||
auto style = QStyleFactory::create("fusion");
|
||||
if (style) {
|
||||
_webView->setStyle(style);
|
||||
}
|
||||
|
||||
_webView->setPage(new DataWebPage());
|
||||
_webView->setUrl(url);
|
||||
|
||||
|
|
Loading…
Reference in a new issue