[konqueror] [Bug 500173] Spurious windows while generating HTML preview in Wayland

"Nicolas Fella" <[email protected]>
Newsgroups gmane.comp.kde.devel.kfm
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=500173

--- Comment #9 from Nicolas Fella <[email protected]> ---
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.