Advice needed: Implementing interactive controls rendered to a bitmap (for 3D)
I need some advice from a Qt expert.
I have a 3D engine (ogre3d) working in concert with Qt (4.x). The 3D Content is displayed in a widget (using a custom OS window in the client area). I'm able to overlay arbitrary Qt widgets onto the 3D world using the widget render() method and a shared bitmap. This makes a great "heads up display". I can use the standard Qt style sheets and animation using this technique.
I'd like to go a step further and allow the user to move these rendered widgets using the mouse.
I'd like some advice on the best way to implement this.
- The widgets in the HUD are not part of the inheritance chain. I render them manually. They don't get events though. I could add them to the inheritance chain so they get events in the usual way. Then I would need to cause them to render to my bitmap instead of to the operating system. I looked at this once but couldn't find enough information to implement it.
- Capture mouse events in the 3D display widget and manually EMIT them to child controls. I basically create my own event handling chain.
Any suggestions on how to implement this?
I'm also likely to want to convert to Qt5 soon. Hopefully any solution would be portable to the new version.