Compiling you example has been extremely helpful, thanks. It worked! I had in fact tried the following code earlier:
QX11EmbedContainer *test=new QX11EmbedContainer(parent);
test->embedClient(winid);
test->show();
which is very very similar, but doesn't work. The only difference I can think of is that in my case, there has not been time enough for the container window to be realised, so the embedding fails. It seems you need to wait for the container to appear on screen. That will probably be possible some way.
Next is the problem of knowing the winid of the process you forked, automatically, as I can't expect my users to use xwininfo....
Cheers.
Martin
Bookmarks