Details
Description
I am working on a local application that is mostly dark. When we load different pages, there is always a white flash during page loading.
We tried to use QWebEngineView -> page().setBackground(Qt::black), but the only thing that changes is the initial background and nothing more.
The related doc https://doc.qt.io/qt-6/qwebenginepage.html#backgroundColor-prop is not describing the reality:
>> you can set it to match your web content in a hybrid application to prevent the white flashes that may appear during loading.
But it cannot.
—
Minimal codes sample:
Two black web pages and a button to load between them. Click and you will see the white flash during loading.
https://github.com/SourceReviver/qtwebengine_bg_not_work