Home > Net >  QtWebEngine displays partially without margins
QtWebEngine displays partially without margins

Time:10-12

WebEngineView should be displayed in the whole window, but it's not. Right margin strip and bottom margin strip is not displayed. Instead a strip of (red) background is visible. Yet I can click on red background on the input search formular and it can be filled. There shouldnt be any background visible.

I also tried QWebEngineView instead of QQmlApplicationEngine and it is exactly the same.

This code is run by Qt 6.4.0. In Qt 5.12.5 it is displayed correctly.

What to do to show WebEngineView in the whole window ?

main.cpp:

int main(int argc, char *argv[])
{
    QtWebEngineQuick::initialize();
    QApplication app(argc, argv);

    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/webengine.qml")));

    return app.exec();
}

webengine.qml:

import QtQuick
import QtQuick.Window
import QtWebEngine

Window {
    width: 800
    height: 600
    visible: true
    color: "red"
    WebEngineView {
        id: webEngineView
        anchors.fill: parent
        url: "https://doc.qt.io/qt-6/qtwebengine-webenginequick-minimal-example.html"
    }
}

The gui:

Gui output

CodePudding user response:

This should already be fixed in 6.4.0, was this observed during the beta, if so, then try with the final release. If observed with the final, please open a bug report for at Qt.

  • Related