How to embed third-party apps into QT application?
-
I want to embed third-party apps (for example firefox.exe) into QT application, could you give me some suggestions please?
QT: 5.12.4
PC: win10-64bit
I want to achieve the effect that all operations of the user must go through my application instead of directly operating the PC.Best Regards!
-
@tovax
Hi
would it not be easier to use windows features to lock down the pc and prevent a user from accessing the part of windows that you do not want ?https://docs.microsoft.com/en-us/windows/configuration/kiosk-single-app
-
Hi,
I think you will have to play with something like the answer on this stack overflow post
-
@SGaist
Hi, thanks!
I have created a simple demo referring to this post.
Demo: EmbedExe
It can start "calc.exe", and "SetWindowPos" correctly.
The HWND of parent widget and child widget is right, but failed to "SetParent".Debug output: EmbedExe::onPushButtonClicked Parent window: 0xc1014 Child window: 0xb126a SetParent - ret 0x0
Could you help me please?
Best Regards! -
Sorry, I currently can't as I don't have any Windows machine at hand.
-
@tovax
Hi
would it not be easier to use windows features to lock down the pc and prevent a user from accessing the part of windows that you do not want ?https://docs.microsoft.com/en-us/windows/configuration/kiosk-single-app
-
Test Results:
- Use "createWidgetContainer":
Embed external exe successfully, embedded window is active, but can't display the titlebar and menubar of the embedded window. - Use windows api "SetParent":
Embed external exe successfully, but embedded window is inactive, and only can't display the menubar of the embedded window.
- Use "createWidgetContainer":
-
@tovax
Hi
Actually win 7 will die in January 2020 :)Anyway, win 7 does not have it as directly as win 10
but via group policy and a few tweaks. you can get the same sort of setup.btw. i did try to use your demo code and have a look but i had no luck either.
The calculator would be its on window regardless. -
@mrjj
Hi,
I don't know why the calculator of win10 can not be embedded, then I downloaded old calc version, and embed it successfully.
But the menubar disappearing. I wonder why the menubar doesn't show up.
This is the new repository (Use createWindowContainer)
NEW: EmbedCalc
Best regards!