https://bugs.kde.org/show_bug.cgi?id=500173

--- Comment #9 from Nicolas Fella <nicolas.fe...@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 watching all bug changes.

Reply via email to