Hello, I have been investigating an interesting bug (using QNX as the platform for Qt). Here is a brief summary:
(all code inside main() and before app.exec())
QQuickView v;
v.setScreen(someSecondScreen);
v.show(); // works as expected
but
QQuickView v;
v.show();
v.setScreen(someSecondScreen); // window is never shown
Is this the expected behavior? The reason this happens is because
QWindow::setScreen() calls destroy(), which triggers setVisible(false).
Afterwards, it calls create() but create() never bothers to display the window
again. In other words, it does
QWindow::setVisible(true) //coming from show();
QWindow::setVisible(false) //coming from setScreen() -> destroy()
For some reason beyond my knowledge, QtWidgets do not suffer for this bug,
i.e.:
QWidget w;
w.setScreen(secondScreen);
w.show(); // works!
and
QWidget w;
w.show();
w.setScreen(secondScreen); // also works
I digged a bit inside the QWidget code and it also follows the pattern of
having setVisible(true) followed by setVisible(false) called, just like in the
QQuickWindow case. However, something is happening that in spite of that the
widget is being shown regardlessy.
Any thoughts? Comments?
Thanks for reading,
Rafael
--
Qt Developer Days 2014 - October 6 - 8 at BCC, Berlin
Rafael Roquetto | [email protected] | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
