[Qt-interest] is it possible to get a non-changing winId?
Ross Bencina
rossb-lists at audiomulch.com
Wed Jun 3 16:38:08 CEST 2009
Hi Denis
> However winId() shouldn't change unless you reparent a widget, or
> hide/show it several times.
OK, well I create it with parent == 0 and then reparent it later. This is
kind-of necessary because creating the parent is expensive and I don't want
to do it if the child fails.
> However winId() shouldn't change unless you reparent a widget, or
> hide/show it several times.
This sounds vague enough to be dangerous for my use-case. I guess
reparenting it is what's causing the problems.
> In worst case you can try create a native window id manually and attach
> it to QWidget with a QWidget::create() function.
Does this _guarantee_ that Qt won't change the HWND? If so, sounds like my
best option..
Thanks!
Ross
More information about the Qt-interest-old
mailing list