[konqueror] [Bug 500173] Spurious windows while generating HTML preview in Wayland
Nicolas Fella
bugzilla_noreply at kde.org
Wed Feb 19 20:29:44 GMT 2025
https://bugs.kde.org/show_bug.cgi?id=500173
--- Comment #9 from Nicolas Fella <nicolas.fella at gmx.de> ---
I can reproduce with this program. I haven't really tried to reproduce it
without a QWebEngineView, but it might be possible
#include <QApplication>
#include <QTimer>
#include <QUrl>
#include <QWebEngineView>
int main(int argc, char **argv) {
QApplication app(argc, argv);
QTimer::singleShot(0, [&app] {
const QUrl indexUrl =
QUrl::fromLocalFile("/home/nico/doc/html/bluezqt-adapter.html");
bool rendered = false;
QWebEngineView view;
QObject::connect(&view, &QWebEngineView::loadFinished, [&rendered] {
QTimer::singleShot(1000, [&rendered] { rendered = true; });
});
view.resize(500, 500);
view.load(indexUrl);
view.setAttribute(Qt::WA_OutsideWSRange);
view.setWindowFlags(view.windowFlags() | Qt::BypassWindowManagerHint |
Qt::FramelessWindowHint);
view.move(5000, 5000);
view.show();
while (!rendered)
qApp->processEvents(QEventLoop::WaitForMoreEvents);
QPixmap pix(500, 500);
pix.fill(QColor(245, 245, 245));
view.render(&pix);
view.hide();
app.quit();
});
return app.exec();
}
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the kfm-devel
mailing list