Search code examples
qtwindownativehandle

Is it possible to declare a QWidget as a child of a window created outside of Qt?


I'd like to use Qt in my browser plugin, but I don't get to create my own window, the browser does.

What I'd like to do is create a QWidget as a child of a native window handle... Is this possible?


Solution

  • You may be able to take over a native window handle by calling QWidget::create() in your custom widget's constructor. Note that it's a protected method so you can't call it on a normal QWidget.