If you build the QML app and run it, you will see a debug output like "Run ./overlay 12345" Go over to your overlay build, and run that command. The Qt app will be replaced with the test pattern, but you can still click the little Rectangle in the GUI.
In the Qt app, I even try to lower the overlay QWidget at line 13, but still the XOverlay covers the entire window. I want the little red rectangle from main.qml to be on top of the overlay QWidget.
For now, I am calling overlay->show() as an independent window, so I wind up with two windows for my app. That works, but it would be great to have the overlay inside Qt Quick so I could use state transitions and animations on its size and shape.
Let me know if you figure something out!
Regards,
Matt