Window {
Window {
id: childWindow
}
}
I have a QML like this, and childWindow icon does not display in task bar when the window is shown. My environment is Windows 7.
In a CPP setting I think it would suffice to set parent of childWindow to 0 to have both windows to be top level.
But how to do that in QML?
You can do something like that:
Item
{
Window
{
id: wnd1
width: 200
height: 200
title: "Window1"
visible: true
onClosing: wnd2.close();
}
Window
{
id: wnd2
width: 200
height: 200
title: "Window2"
visible: true
}
}
Note that when wnd1 is closed (main/root window) also the second one gets closed onClosing handle ensuring the correct - or expected - behaviour on main window closing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With