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. Help regarding QRemoteObject.
Forum Updated to NodeBB v4.3 + New Features

Help regarding QRemoteObject.

Scheduled Pinned Locked Moved Solved General and Desktop
28 Posts 4 Posters 3.1k Views 1 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.
  • P Offline
    P Offline
    Pradson
    wrote on last edited by
    #1

    Hello,

    I am using Qt C++ (Qt 5.12.3 version) for windows platform. I have developed an application which which renders on desktop. The same application I want to open in browser to view in web mode. I came to know regarding QRemoteObject which renders the application on desktop and web. I tried to seek some help regarding the same but unable to find it. Can anyone provide some help or a sample script on how to use this QRemoteObject?

    Thankyou,

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      To quote the docs, "Qt Remote Objects (QtRO) is an Inter-Process Communication (IPC) module". Nothing to do with rendering a desktop application in a web environment.

      P 1 Reply Last reply
      1
      • C ChrisW67

        To quote the docs, "Qt Remote Objects (QtRO) is an Inter-Process Communication (IPC) module". Nothing to do with rendering a desktop application in a web environment.

        P Offline
        P Offline
        Pradson
        wrote on last edited by Pradson
        #3

        @ChrisW67

        Hi,
        Thanks a lot for reply.

        I think it could be possible to achieve the same with the combination of WebGL+QRemoteObject as mentioned in the below link-
        https://www.develer.com/en/interact-with-a-qt-ui-from-any-browser/

        I have tried to achieve the same with the help of below example link but I am unable to connect source replica signal currStateChanged() with client's recSwitchState() slot to receive source's current state. Whenever I run the same example application, then this "QObject::connect: No such signal SimpleSwitch::currStateChanged()" error message is appear in the console.

        https://doc.qt.io/qt-5/remoteobjects-example-dynamic-replica.html

        Kindly find the code section where I got the signal & slot connection error.

        // Function to initialize connections between slots and signals
        void DynamicClient::initConnection_slot()
        {
            // connect source replica signal currStateChanged() with client's recSwitchState() slot to receive source's current state
           bool b1 = QObject::connect(reptr.data(), SIGNAL(currStateChanged()), this, SLOT(recSwitchState_slot()));
           
           // connect client's echoSwitchState(..) signal with replica's server_slot(..) to echo back received state
           bool b2 = QObject::connect(this, SIGNAL(echoSwitchState(bool)),reptr.data(), SLOT(server_slot(bool)));
        }
        

        If any more reference regarding the same, then kindly share.

        Thanks,
        Pradson

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

          Hi,

          Aren't you looking for Qt for WebAssembly ?

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

          P 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Aren't you looking for Qt for WebAssembly ?

            P Offline
            P Offline
            Pradson
            wrote on last edited by Pradson
            #5

            @SGaist

            Hi,
            Thanks for reply.

            I am trying to interact with a Qt UI from any browser, for this I have tried the combination of WebGL+QRemoteObject as explained in the below link but I am facing runtime signal slot connection error as explained in the previous query. Do u have any idea regarding the same please share.
            https://www.develer.com/en/interact-with-a-qt-ui-from-any-browser/

            Regarding Qt for WebAssembly -
            I need to describe some information regarding my product first. I am using C++/Qt5.12.3 and VisualStudio2017 compiler to build my product. I have used Qt widgets for UI as well.
            Now I have few questions regarding Qt for WebAssembly-

            • Is Qt for WebAssembly capable to render Qtwidgets UI into web browser. If it is capable then with which version of Qt and VisualStudio complier?
            • Could I adopt it with my existing versions of the product (C++/Qt5.12.3 and VS2017 compiler)?
            • I have to go with VisualStudio Compiler. Can I adapt it easily with VS compiler?
            • Could you share me a sample example application code step by step of Qt for WebAssembly ( using C++/Qt widgets UI with VS compiler)?

            Thankyou,
            Pradson

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

              Yes, it can render widget based interfaces.
              It does not use Visual Studio at all.
              The versions supported are shown here.
              As for demos, here you have starting page.

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

              P 1 Reply Last reply
              1
              • SGaistS SGaist

                Yes, it can render widget based interfaces.
                It does not use Visual Studio at all.
                The versions supported are shown here.
                As for demos, here you have starting page.

                P Offline
                P Offline
                Pradson
                wrote on last edited by
                #7

                @SGaist
                Hi

                Thanks a lot for prompt reply.

                Please correct me-
                I can not use the compiled binary of a Qt/C++ widgets application using VisualStudio Compiler for the Qt For WebAssembly ??? I think MinWG is supported for the same?

                Is any road map plan to provide support for Visual Studio Compiler for the Qt For WebAssembly?

                Thankyou,
                Pradson

                jsulmJ 1 Reply Last reply
                0
                • P Pradson

                  @SGaist
                  Hi

                  Thanks a lot for prompt reply.

                  Please correct me-
                  I can not use the compiled binary of a Qt/C++ widgets application using VisualStudio Compiler for the Qt For WebAssembly ??? I think MinWG is supported for the same?

                  Is any road map plan to provide support for Visual Studio Compiler for the Qt For WebAssembly?

                  Thankyou,
                  Pradson

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Pradson said in Help regarding QRemoteObject.:

                  I can not use the compiled binary of a Qt/C++ widgets application using VisualStudio Compiler for the Qt For WebAssembly ?

                  You can't.
                  As explained in https://doc.qt.io/qt-5/wasm.html you need emscripten as toolchain/compiler.
                  Whether Visual Studio Compiler will support WebAssembly in future is something you need to ask Microsoft.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Pradson said in Help regarding QRemoteObject.:

                    I can not use the compiled binary of a Qt/C++ widgets application using VisualStudio Compiler for the Qt For WebAssembly ?

                    You can't.
                    As explained in https://doc.qt.io/qt-5/wasm.html you need emscripten as toolchain/compiler.
                    Whether Visual Studio Compiler will support WebAssembly in future is something you need to ask Microsoft.

                    P Offline
                    P Offline
                    Pradson
                    wrote on last edited by
                    #9

                    @jsulm

                    Hi,
                    Thanks for reply.

                    As you have shared me the link a saw about MinGW -
                    On Windows, make sure you have MinGW as well as sed in your PATH

                    My simple question was can I replace MinGW from VisualStudio to achieve the same?
                    (Or)
                    The Emscripten is enough for building Qt application and generating files for web?

                    Thanks & Regards,
                    Pradson

                    jsulmJ 1 Reply Last reply
                    0
                    • P Pradson

                      @jsulm

                      Hi,
                      Thanks for reply.

                      As you have shared me the link a saw about MinGW -
                      On Windows, make sure you have MinGW as well as sed in your PATH

                      My simple question was can I replace MinGW from VisualStudio to achieve the same?
                      (Or)
                      The Emscripten is enough for building Qt application and generating files for web?

                      Thanks & Regards,
                      Pradson

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Pradson said in Help regarding QRemoteObject.:

                      My simple question was can I replace MinGW from VisualStudio to achieve the same?

                      I don't understand this question. Visual Studio does not have MinGW as far as I know.
                      MinGW is only needed if you want to build Qt by yourself. But do you want to do so? You can simply install prebuild Qt using Qt Online Installer.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      P 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Pradson said in Help regarding QRemoteObject.:

                        My simple question was can I replace MinGW from VisualStudio to achieve the same?

                        I don't understand this question. Visual Studio does not have MinGW as far as I know.
                        MinGW is only needed if you want to build Qt by yourself. But do you want to do so? You can simply install prebuild Qt using Qt Online Installer.

                        P Offline
                        P Offline
                        Pradson
                        wrote on last edited by
                        #11

                        @jsulm
                        Hi,

                        Could you explain me the steps along with software required for the below mentioned case so that I could achieve the same?

                        I have created a calculator UI application in Qt Designer using Qt Widgets/C++. This calculator program is capable to run on desktop. How could I render it into web browser?

                        Thanks,
                        Pradson

                        jsulmJ 1 Reply Last reply
                        0
                        • P Pradson

                          @jsulm
                          Hi,

                          Could you explain me the steps along with software required for the below mentioned case so that I could achieve the same?

                          I have created a calculator UI application in Qt Designer using Qt Widgets/C++. This calculator program is capable to run on desktop. How could I render it into web browser?

                          Thanks,
                          Pradson

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Pradson

                          1. Install emscripten
                          2. Install Qt for WebAssembly (using Qt Online Installer or Qt Maintenance Tool)
                          3. Open your project in QtCreator
                          4. Build your project in QtCreator using the Kit for WebAssembly (this Kit is the one using emscripten as compiler and Qt for WebAssembly)

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          P 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @Pradson

                            1. Install emscripten
                            2. Install Qt for WebAssembly (using Qt Online Installer or Qt Maintenance Tool)
                            3. Open your project in QtCreator
                            4. Build your project in QtCreator using the Kit for WebAssembly (this Kit is the one using emscripten as compiler and Qt for WebAssembly)
                            P Offline
                            P Offline
                            Pradson
                            wrote on last edited by
                            #13

                            @jsulm

                            I have installed emscripten but Qt for WebAssembly option is not available in the MaintenanceTool of the Qt5.15.10 LTS. I have attached screenshot herewith. WebAssembly.png

                            Kindly check and suggest.
                            Thanks,

                            jsulmJ 1 Reply Last reply
                            0
                            • P Pradson

                              @jsulm

                              I have installed emscripten but Qt for WebAssembly option is not available in the MaintenanceTool of the Qt5.15.10 LTS. I have attached screenshot herewith. WebAssembly.png

                              Kindly check and suggest.
                              Thanks,

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @Pradson Is it really all you see there? Usually you would for example also see Qt for MinGW. Is it offline installation?

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              P 1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @Pradson Is it really all you see there? Usually you would for example also see Qt for MinGW. Is it offline installation?

                                P Offline
                                P Offline
                                Pradson
                                wrote on last edited by Pradson
                                #15

                                @jsulm

                                Hi,
                                Thanks a lot for reply.

                                I had installed Qt version "qt-enterprise-windows-x86-5.15.10" . It is offline installer. I can not go with MinGW, as I had told you earlier. I will have to prefer VisualStudio compiler (MSVC) because my current product is based on MSVC.

                                I would like to explain my requirement once again-
                                I have a product which is based on Qt5.15/C++. I am using MSVC binaries of Qt5.15. This means I have build my product using VisualStudio Compiler (MSVC). My product has QtWidgets UIs as well and I have to visualize those UIs in both desktop as well as in web. Is it possible using Qt for WebAssembly ? Is there any other method available?

                                **Please Note: ** I have to go with MSVC compiler.

                                Thanks,

                                jsulmJ 1 Reply Last reply
                                0
                                • P Pradson

                                  @jsulm

                                  Hi,
                                  Thanks a lot for reply.

                                  I had installed Qt version "qt-enterprise-windows-x86-5.15.10" . It is offline installer. I can not go with MinGW, as I had told you earlier. I will have to prefer VisualStudio compiler (MSVC) because my current product is based on MSVC.

                                  I would like to explain my requirement once again-
                                  I have a product which is based on Qt5.15/C++. I am using MSVC binaries of Qt5.15. This means I have build my product using VisualStudio Compiler (MSVC). My product has QtWidgets UIs as well and I have to visualize those UIs in both desktop as well as in web. Is it possible using Qt for WebAssembly ? Is there any other method available?

                                  **Please Note: ** I have to go with MSVC compiler.

                                  Thanks,

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  @Pradson If it is offline installer you will need to download offline installer for WebAssembly or use online installer. As commercial user you can also ask Qt Company for support.
                                  I did not suggest to use MinGW, it was just an example for what you usually see in the maintenance tool...

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  P 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @Pradson If it is offline installer you will need to download offline installer for WebAssembly or use online installer. As commercial user you can also ask Qt Company for support.
                                    I did not suggest to use MinGW, it was just an example for what you usually see in the maintenance tool...

                                    P Offline
                                    P Offline
                                    Pradson
                                    wrote on last edited by
                                    #17

                                    @jsulm

                                    Hi,

                                    As suggested, I have installed Qt5.15.10(MSVC2017 binaries) with all necessary packages including WebAssembly using online installer. I have create a sample QWidget UI application named "CalculatorOnWeb" and I am able to build successfully using the kit Qt 5.15.10 (msvc2019_64) . But when I select kit WebAssembly Qt 5.15.10, then getting errors-

                                    Could not start process "mingw32-make.exe" -f C:/SE_CODE/Qt_related/QtForWebAssembly/CalculatorOnWeb/Makefile qmake_all.
                                    Error while building/deploying project CalculatorOnWeb (kit: WebAssembly Qt 5.15.10)
                                    When executing step "qmake"
                                    

                                    Even when I tries to clean this project, then getting this error-

                                    Could not start process "mingw32-make.exe" clean -j16.
                                    Error while building/deploying project CalculatorOnWeb (kit: WebAssembly Qt 5.15.10)
                                    When executing step "Make"
                                    

                                    I have attached a screenshot herewith related to configuration of WebAssembly.
                                    WebAssemblySettings.png
                                    It is asking for MinGW and I can not go with MinGW as I had told you earlier. Please suggest about these errors.

                                    Thanks,
                                    Pradson

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • P Pradson

                                      @jsulm

                                      Hi,

                                      As suggested, I have installed Qt5.15.10(MSVC2017 binaries) with all necessary packages including WebAssembly using online installer. I have create a sample QWidget UI application named "CalculatorOnWeb" and I am able to build successfully using the kit Qt 5.15.10 (msvc2019_64) . But when I select kit WebAssembly Qt 5.15.10, then getting errors-

                                      Could not start process "mingw32-make.exe" -f C:/SE_CODE/Qt_related/QtForWebAssembly/CalculatorOnWeb/Makefile qmake_all.
                                      Error while building/deploying project CalculatorOnWeb (kit: WebAssembly Qt 5.15.10)
                                      When executing step "qmake"
                                      

                                      Even when I tries to clean this project, then getting this error-

                                      Could not start process "mingw32-make.exe" clean -j16.
                                      Error while building/deploying project CalculatorOnWeb (kit: WebAssembly Qt 5.15.10)
                                      When executing step "Make"
                                      

                                      I have attached a screenshot herewith related to configuration of WebAssembly.
                                      WebAssemblySettings.png
                                      It is asking for MinGW and I can not go with MinGW as I had told you earlier. Please suggest about these errors.

                                      Thanks,
                                      Pradson

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @Pradson I don't use WebAssembly, so not sure. But it looks like for WebAssembly MinGW tool chain is used. So, try to install it via Qt Maintenance Tool. msvc2019_64 Qt has nothing to do with Qt for WebAssembly, it is for native Windows builds.

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      P 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @Pradson I don't use WebAssembly, so not sure. But it looks like for WebAssembly MinGW tool chain is used. So, try to install it via Qt Maintenance Tool. msvc2019_64 Qt has nothing to do with Qt for WebAssembly, it is for native Windows builds.

                                        P Offline
                                        P Offline
                                        Pradson
                                        wrote on last edited by
                                        #19

                                        @jsulm

                                        Hi,
                                        Thanks for prompt reply.

                                        How will I install the WebAssembly MSVC tool chain ? I am unable to find the proper package from online installer. I am sharing the screenshot of MaintenanceTool. Please suggest which package is required to install.
                                        Qt5.15.10_Packages-1.png

                                        Qt5.15.10_Packages-2.png

                                        Qt5.15.10_Packages-3.png

                                        Thanks,
                                        Pradson

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • P Pradson

                                          @jsulm

                                          Hi,
                                          Thanks for prompt reply.

                                          How will I install the WebAssembly MSVC tool chain ? I am unable to find the proper package from online installer. I am sharing the screenshot of MaintenanceTool. Please suggest which package is required to install.
                                          Qt5.15.10_Packages-1.png

                                          Qt5.15.10_Packages-2.png

                                          Qt5.15.10_Packages-3.png

                                          Thanks,
                                          Pradson

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by jsulm
                                          #20

                                          @Pradson I don't think there is such a thing as "WebAssembly MSVC tool chain". WebAssembly uses Enscrypten as compiler as far as I know, not MS VC++. SO, again: try to install MinGW (I mean only the tool chain not Qt for MinGW).

                                          Please take a look at https://doc.qt.io/qt-5/wasm.html

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          P 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