Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to embed third-party apps into QT application?
Forum Updated to NodeBB v4.3 + New Features

How to embed third-party apps into QT application?

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 4 Posters 1.8k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tovaxT Offline
    tovaxT Offline
    tovax
    wrote on last edited by tovax
    #1

    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!

    1 Reply Last reply
    0
    • tovaxT tovax

      @SGaist
      It doesn't matter, thanks.

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #8

      @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

      tovaxT 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        I think you will have to play with something like the answer on this stack overflow post

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        tovaxT 1 Reply Last reply
        4
        • SGaistS SGaist

          Hi,

          I think you will have to play with something like the answer on this stack overflow post

          tovaxT Offline
          tovaxT Offline
          tovax
          wrote on last edited by
          #3

          @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!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Sorry, I currently can't as I don't have any Windows machine at hand.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            tovaxT 1 Reply Last reply
            0
            • fcarneyF Offline
              fcarneyF Offline
              fcarney
              wrote on last edited by
              #5

              @tovax What is the end goal? Are you wanting to automate something?

              C++ is a perfectly valid school of magic.

              tovaxT 1 Reply Last reply
              0
              • fcarneyF fcarney

                @tovax What is the end goal? Are you wanting to automate something?

                tovaxT Offline
                tovaxT Offline
                tovax
                wrote on last edited by
                #6

                @fcarney
                Hi,
                I want to achieve the effect that all operations of the user must go through my application instead of directly operating the PC.
                Prohibit users from operating PC, no automation required.

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Sorry, I currently can't as I don't have any Windows machine at hand.

                  tovaxT Offline
                  tovaxT Offline
                  tovax
                  wrote on last edited by
                  #7

                  @SGaist
                  It doesn't matter, thanks.

                  mrjjM 1 Reply Last reply
                  0
                  • tovaxT tovax

                    @SGaist
                    It doesn't matter, thanks.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @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

                    tovaxT 1 Reply Last reply
                    2
                    • mrjjM mrjj

                      @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

                      tovaxT Offline
                      tovaxT Offline
                      tovax
                      wrote on last edited by
                      #9

                      Hi,
                      Since there will be at least two operating systems in the future, win7 and win10, I wonder if win7 can use kiosk mode?
                      Best regards!

                      mrjjM 1 Reply Last reply
                      0
                      • tovaxT Offline
                        tovaxT Offline
                        tovax
                        wrote on last edited by tovax
                        #10

                        Test Results:

                        1. Use "createWidgetContainer":
                          Embed external exe successfully, embedded window is active, but can't display the titlebar and menubar of the embedded window.
                        2. Use windows api "SetParent":
                          Embed external exe successfully, but embedded window is inactive, and only can't display the menubar of the embedded window.
                        1 Reply Last reply
                        1
                        • tovaxT tovax

                          Hi,
                          Since there will be at least two operating systems in the future, win7 and win10, I wonder if win7 can use kiosk mode?
                          Best regards!

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #11

                          @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.

                          tovaxT 1 Reply Last reply
                          1
                          • mrjjM mrjj

                            @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.

                            tovaxT Offline
                            tovaxT Offline
                            tovax
                            wrote on last edited by tovax
                            #12

                            @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!

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved