mirror of https://github.com/qt/qt3d.git
quickwidget-switch: make it work in a single screen setup
Pick-to: 6.4 6.5 Change-Id: I5f17169c106a70c38bcc29cc7758b2bb4b9ee793 Reviewed-by: Mike Krus <mike.krus@kdab.com>
This commit is contained in:
parent
aee00ddfb3
commit
675bb0d092
|
@ -35,7 +35,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
QMainWindow w2;
|
||||
w2.winId();
|
||||
w2.windowHandle()->setScreen(QGuiApplication::screens().at(1));
|
||||
const int secondScreenIdx = QGuiApplication::screens().size() > 1 ? 1 : 0;
|
||||
w2.windowHandle()->setScreen(QGuiApplication::screens().at(secondScreenIdx));
|
||||
auto mdiArea2 = new QMdiArea;
|
||||
auto button2 = new QPushButton("Switch to this window");
|
||||
configureMainWindow(&w2, mdiArea2, button2);
|
||||
|
|
Loading…
Reference in New Issue