[Development] can I put a QWindow in a QWidget? or vice-versa?

lars.knoll at nokia.com lars.knoll at nokia.com
Wed Sep 12 12:41:47 CEST 2012


On Sep 11, 2012, at 1:38 AM, ext Alan Ezust <alan.ezust at gmail.com> wrote:

> I am porting a Qt4 app that has a QMainWindow and a bunch of widgets
> in a layout, one of them
> being a QDeclarativeView.
> 
> I thought I'd try putting a QQuickView in its place but I am wondering
> what to pass to its constructor arguments,
> (it can't have a widget as a parent)...
> or how to add it to a QLayout since it does not derive from QWidget.
> 
> Are there examples of how to mix the two in a single rectangular area?

There's nothing there that works out of the box currently. One way to get something to work would probably be to make the QWindow a child of toplevelWidget()->windowHandle() and manage geometry yourself.

Cheers,
Lars




More information about the Development mailing list