Closed davidlatwe closed 7 years ago
Thanks you so much @davidpower! This is amazing, I will try this out now.
Can confirm it works in Nuke :)
Works here too. Apart from the minor bug from your gif, where when you focus QML followed by another floating window, QML appears behind Maya. A small detail. The overall functionality looks solid and feels like a real parented window. :)
Great job @davidpower! I'm happy to merge this.
For completeness, this addresses issue number 1! The first issue ever submitted to the project, almost three years ago.
Really glad it helps!!
Currently it use host main window's QEvent.WindowActivate
and QEvent.WindowDeactivate
event to add or remove QML GUI's stayOnTopFlag
.
So if only consider the host and other app's window, this should do the trick well.
But if something like Maya that has it's own float window, this will not work well. : (
I think this might need a real child window to achieve that, or other kind of windowFlag I guess.
Cheers !
But if something like Maya that has it's own float window, this will not work well. : (
It's safe to save that for a new PR in the future once we've given this a spin. I increased the version and will merge now. Thanks again @davidpower!
Make QML GUI acts like host main window's child window
This PR intend to provide a alternative way to "Parent window to host"
By installing an eventFilter to the host main window, and connect
show
,hide
,activate
anddeactivate
events to QML app.Currently tested in maya 2016-2017, and Houdini 16
Here is a demo.
Hope this help !