[Interest] Qt 5.8 Software Backend Bug on Windows? - Window fails to copmpletly update after closing it and opening it again

Nuno Santos nunosantos at imaginando.pt
Mon Feb 20 13:16:02 CET 2017


Hi,

I was updating a desktop tool of mine to use Qt 5.8. In this tool I use 
software backend to render its contents.

Since I need to have a system tray icon to open it again when it is 
closed, I instantiate it as a QQuickView. This is what I do:

// on Qt 5.7
qputenv("QMLSCENE_DEVICE","softwarecontext");
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);

// on Qt 5.8
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);

QQuickView view;

view.setSource(QUrl("qrc:/qml/main.qml"));
view.setResizeMode(QQuickView::SizeRootObjectToView);

QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));

view.show();

QAction *quitAction = new QAction(app.tr("&Quit"), &view);
QAction *openAction = new QAction(app.tr("&Open"), &view);

app.connect(quitAction, SIGNAL(triggered()), &app, SLOT(quit()));
app.connect(openAction, SIGNAL(triggered()), &view, SLOT(show()));

With Qt 5.7 when I close and open the window, it appears correctly. With 
Qt 5.8, after closing and opening the window again, everything goes 
white. The controls are there and get updated if I interact with them 
but it seems lacking a fullscreen refresh.

If I disable the SoftwareBackend everything works as expected. I suspect 
this is a bug from Qt 5.8 software backend implementation.

Should I report a bug?

Regards,

Nuno




More information about the Interest mailing list