Avoid Qt 6.8 bug

Still present in Qt 6.8.3, just calling setUrl
before adding the QWebEngineView to QDialog
avoids the issue and, since this is a reasonable
initialization anyway, it is done unconditionally.
https://bugreports.qt.io/browse/QTBUG-135002
This commit is contained in:
Alejandro Martinez
2025-03-25 21:19:00 -03:00
parent a57063ce57
commit f03f06c7f2
2 changed files with 3 additions and 0 deletions

View File

@@ -438,6 +438,7 @@ PythonChart::setWeb(bool x)
// setup the canvas
canvas = new QWebEngineView(this);
canvas->setUrl(QUrl());
canvas->setContentsMargins(0,0,0,0);
canvas->setZoomFactor(dpiXFactor);
canvas->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));

View File

@@ -171,6 +171,8 @@ WebPageWindow::WebPageWindow(Context *context) : GcChartWindow(context), context
connect(view->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadRequest*)), this, SLOT(downloadRequested(QWebEngineDownloadRequest*)));
#endif
connect(view->page(), SIGNAL(linkHovered(QString)), this, SLOT(linkHovered(QString)));
forceReplot();
}
WebPageWindow::~WebPageWindow()