How to get another process window handle using qt
-
wrote on 24 Dec 2011, 10:11 last edited by
Hi,
I am trying to get the window handle of the mstsc window using qt.
In win32 I can do it using win32 api HWND hMSTSCWindow = FindWindow(L"TSSHELLWND", NULL);
is there something similar exist in qt, same stuff I would like to try in Linux as well, there I will be looking for XRDP window handleRegards
Ashish -
wrote on 24 Dec 2011, 14:00 last edited by
"QWidget::winId() ":/doc/qt-4.8/qwidget.html#winId could be what you need.
-
wrote on 24 Dec 2011, 18:50 last edited by
I'm not sure that QWidget::winId() is useable in his case. He want non-application window.
eg. for embedding firefox into qt app, so I guess that he need direct calls to X11. -
wrote on 24 Dec 2011, 19:01 last edited by
In that case, there is no Qt method to retrieve the id. One will have to resort to platform dependent code.
-
wrote on 25 Dec 2011, 17:01 last edited by
ok if this is the case then I can write a code for separate plattform.
But is it possible to make my qt application window as a child of another win32/X11 application.Actually I wanted to move my qt application in mstsc window.
I have seen a method in QWidget named as setParent(QWidget *). But even I use plattform specific code to get the window id, can we make qt application as a child of this using qt api only?Currently I hace achieved this using plattform specific code as setParent under windows , it works well but I am looking for qt way to do this.
-
wrote on 27 Dec 2011, 08:35 last edited by
No Qt does not have such ability. You have to do it on your own for each platform separatelly (but it's possible).
-
wrote on 27 Dec 2011, 13:45 last edited by
Is your problem solved ?
-
wrote on 28 Dec 2011, 06:06 last edited by
Hi,
Thanks for your suggestion, I wrote code for windows and it works well,
I am able to move my qtApp as a child of mstsc, yet to give a try for X11 system.Regards
Ashish -
wrote on 5 Feb 2012, 14:35 last edited by
Hello Guys,
I was just browsing thru and came to this question.
Although it seems that Ashish's problem is solved - still I think you all would be interested in going thru this link about the QxtWindowSystem Class:
http://libqxt.bitbucket.org/doc/0.6/qxtwindowsystem.htmlI hope I've added a useful link to the discussion.
Regards,
zeFree