Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploy and run a simple UWP Application with QT
Servers for Qt installer are currently down

Deploy and run a simple UWP Application with QT

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 3 Posters 2.1k Views 2 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.
  • T Offline
    T Offline
    TayMarthin21
    wrote on 16 Jun 2020, 12:56 last edited by
    #1

    Hi all,

    I am wondering if some guy could help me with this issue. What I need is easy to explain, just running an application compiled in QT for UWP (I am using Qt for UWP 5.15.0 64bits - MSVC 2019). My OS is Windows 10 Home running on a Desktop.

    What I've done:

    1. Build and compile from QT Creator. OK
    2. Edit manifest and install application using PowerShell and winrtrunner tool (both ways work). OK
    3. Once the application is started via winrtrunner tool it retieves an error
      C:\Users\tyousef\Desktop\QT App\UWP_POCAnalyzer>winrtrunner --start
      Test.exe
      qt.winrtrunner: Using the Appx profile.
      qt.winrtrunner: Package already installed.
      qt.winrtrunner: Failed to activate application: 0x8027025b "La aplicación no se inició"

    Visually it seems to initiate the application (logo screen is displayed) but it crashes inmediately. It is nothing to do with my code, I try to do it with a single project from QT Creator examples and it happens the same.

    Other point that could help is to install and run a Debugger for UWP applications in QT Creator. When running it says that "Unable to find the platform plugin" but that folder exists with the required DLLs in the debug folder.

    A single Hello World application is enough for me, if someone can help me.

    Thanks in advance.

    Tay

    T 1 Reply Last reply 24 Jun 2020, 13:10
    0
    • H Offline
      H Offline
      hskoglund
      wrote on 16 Jun 2020, 19:02 last edited by
      #2

      Hi, did you also run windeployqt on your test.exe?

      1 Reply Last reply
      1
      • T Offline
        T Offline
        TayMarthin21
        wrote on 17 Jun 2020, 05:13 last edited by
        #3

        @hskoglund said in Deploy and run a simple UWP Application with QT:

        windeployqt

        Yes, thanks for answering. I ran windeployqt just to have all the dependencies in the same directory as the executable.

        J 1 Reply Last reply 24 Jun 2020, 13:16
        0
        • T TayMarthin21
          16 Jun 2020, 12:56

          Hi all,

          I am wondering if some guy could help me with this issue. What I need is easy to explain, just running an application compiled in QT for UWP (I am using Qt for UWP 5.15.0 64bits - MSVC 2019). My OS is Windows 10 Home running on a Desktop.

          What I've done:

          1. Build and compile from QT Creator. OK
          2. Edit manifest and install application using PowerShell and winrtrunner tool (both ways work). OK
          3. Once the application is started via winrtrunner tool it retieves an error
            C:\Users\tyousef\Desktop\QT App\UWP_POCAnalyzer>winrtrunner --start
            Test.exe
            qt.winrtrunner: Using the Appx profile.
            qt.winrtrunner: Package already installed.
            qt.winrtrunner: Failed to activate application: 0x8027025b "La aplicación no se inició"

          Visually it seems to initiate the application (logo screen is displayed) but it crashes inmediately. It is nothing to do with my code, I try to do it with a single project from QT Creator examples and it happens the same.

          Other point that could help is to install and run a Debugger for UWP applications in QT Creator. When running it says that "Unable to find the platform plugin" but that folder exists with the required DLLs in the debug folder.

          A single Hello World application is enough for me, if someone can help me.

          Thanks in advance.

          Tay

          T Offline
          T Offline
          TayMarthin21
          wrote on 24 Jun 2020, 13:10 last edited by
          #4

          @TayMarthin21 Anybody else has a suggestion to fix this issue??

          1 Reply Last reply
          0
          • T TayMarthin21
            17 Jun 2020, 05:13

            @hskoglund said in Deploy and run a simple UWP Application with QT:

            windeployqt

            Yes, thanks for answering. I ran windeployqt just to have all the dependencies in the same directory as the executable.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 24 Jun 2020, 13:16 last edited by
            #5

            @TayMarthin21 said in Deploy and run a simple UWP Application with QT:

            all the dependencies in the same directory as the executable

            Keep in mind that plug-ins and platform plug-in need a special treatment. It is explained here: https://doc.qt.io/qt-5/windows-deployment.html
            Example from the link:

            The executable	                        plugandpaint.exe
            The Basic Tools plugin	                plugins\pnp_basictools.dll
            The ExtraFilters plugin	                plugins\pnp_extrafilters.dll
            The Qt Windows platform plugin   	platforms\qwindows.dll
            The Qt Windows Vista style plugin	styles\qwindowsvistastyle.dll
            The Qt Core module	                Qt5Core.dll
            The Qt GUI module	                Qt5Gui.dll
            The Qt Widgets module	                Qt5Widgets.dll
            

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

            T 2 Replies Last reply 24 Jun 2020, 14:55
            0
            • J jsulm
              24 Jun 2020, 13:16

              @TayMarthin21 said in Deploy and run a simple UWP Application with QT:

              all the dependencies in the same directory as the executable

              Keep in mind that plug-ins and platform plug-in need a special treatment. It is explained here: https://doc.qt.io/qt-5/windows-deployment.html
              Example from the link:

              The executable	                        plugandpaint.exe
              The Basic Tools plugin	                plugins\pnp_basictools.dll
              The ExtraFilters plugin	                plugins\pnp_extrafilters.dll
              The Qt Windows platform plugin   	platforms\qwindows.dll
              The Qt Windows Vista style plugin	styles\qwindowsvistastyle.dll
              The Qt Core module	                Qt5Core.dll
              The Qt GUI module	                Qt5Gui.dll
              The Qt Widgets module	                Qt5Widgets.dll
              
              T Offline
              T Offline
              TayMarthin21
              wrote on 24 Jun 2020, 14:55 last edited by
              #6

              @jsulm Thank you. As I said, I am able to build and run a QT application and deployment works as well, but the problem comes when I try to do the "same" when compiling a UWP project. Compiling is ok, but it fails when launching the application. I am doing it under a desktop Windows 10 environment, so I think it should work. Due to this application is built as an UWP program, I need to overwrite the manifest file for the App, and errors related to that are fixed now. So, to run this application, as far as I know, I have to use WinRTRunner tool (a double click on the EXECUTABLE gives me errors about some DLLs which are installed and specified inside the manifest file) , and that fails. I don't now how to debug the application, but it happens when any application I built, even with the examples that are coming with QT installation.

              Please, could you give me a simple guide to build (done ok!) and Run a simple UWP application developed under QT framework?
              Once a simple "Hello World" application is running, just is a question to adapt the environment to my App.

              Thanks a lot again,
              Regards,
              Tay

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hskoglund
                wrote on 24 Jun 2020, 15:15 last edited by
                #7

                Hi, did you enable "Developer mode" in your Windows 10?

                T 1 Reply Last reply 30 Jun 2020, 08:04
                0
                • H hskoglund
                  24 Jun 2020, 15:15

                  Hi, did you enable "Developer mode" in your Windows 10?

                  T Offline
                  T Offline
                  TayMarthin21
                  wrote on 30 Jun 2020, 08:04 last edited by TayMarthin21
                  #8

                  @hskoglund Yes, it is in Developer Mode.

                  1 Reply Last reply
                  0
                  • J jsulm
                    24 Jun 2020, 13:16

                    @TayMarthin21 said in Deploy and run a simple UWP Application with QT:

                    all the dependencies in the same directory as the executable

                    Keep in mind that plug-ins and platform plug-in need a special treatment. It is explained here: https://doc.qt.io/qt-5/windows-deployment.html
                    Example from the link:

                    The executable	                        plugandpaint.exe
                    The Basic Tools plugin	                plugins\pnp_basictools.dll
                    The ExtraFilters plugin	                plugins\pnp_extrafilters.dll
                    The Qt Windows platform plugin   	platforms\qwindows.dll
                    The Qt Windows Vista style plugin	styles\qwindowsvistastyle.dll
                    The Qt Core module	                Qt5Core.dll
                    The Qt GUI module	                Qt5Gui.dll
                    The Qt Widgets module	                Qt5Widgets.dll
                    
                    T Offline
                    T Offline
                    TayMarthin21
                    wrote on 30 Jun 2020, 08:20 last edited by TayMarthin21
                    #9

                    @jsulm Hello! After some days working with other stuff, I came back to this issue. Ok, I have some progress. Now, from QT Creator I can try to start the debugger and there is no error about "Unable to find the platform plugin". I fixed it by commenting in the environment variables the path to other QT compilers and left only the one that applies to UWP WinRT. With that I have another new error that I have to investigate "Failure during startup. Aborting. Cannot establisg connection to the WinRT debugging helper". I think is related to the debugger. I will try first with Release version because now the platform/plugin DLL qwinrt.dll is copied successfully while deploying with windeployqt. Thanks again for your help. In the meantime if you have any idea about this new issue, suggestions are welcomed!!!

                    Tay

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hskoglund
                      wrote on 30 Jun 2020, 08:31 last edited by
                      #10

                      Hmm, I have the same: Windows 10 Home set to Developer mode and with Qt UWP 5.15.0 64-bits for MSVC 2019. To test it, I created an empty vanilla Qt widgets app, and built it in Release mode with Qt 5.15.0 UWP 64-bit (MSVC 2019).

                      When I run it from inside Qt Creator, I see a green Qt logo splash momentarily and then there's a white window.

                      If I quit the app and Qr Creator and want to run it standalone (outside of Qt Creator), I can do that by launching a CMD window, and type:

                      cd C:\Users\User\Documents\build-untitled-Qt_5_15_0_for_UWP_64bit_MSVC_2019-Release\release>
                      C:\Qt\5..15.0\\winrt_x64_msvc2019\bin\winrtrunner.exe --start untitled.exe
                      qt.winrtrunner: Using the Appx profile.
                      qt.winrtrunner: Package already installed.
                      qt.winrtrunner: App started with process ID 4032
                      

                      Note: windeployqt is not needed and I don't touch the AppxManifest.xml file.
                      But if you repeat my procedure, the untitled.exe will not start for you?

                      T 1 Reply Last reply 30 Jun 2020, 08:49
                      2
                      • H hskoglund
                        30 Jun 2020, 08:31

                        Hmm, I have the same: Windows 10 Home set to Developer mode and with Qt UWP 5.15.0 64-bits for MSVC 2019. To test it, I created an empty vanilla Qt widgets app, and built it in Release mode with Qt 5.15.0 UWP 64-bit (MSVC 2019).

                        When I run it from inside Qt Creator, I see a green Qt logo splash momentarily and then there's a white window.

                        If I quit the app and Qr Creator and want to run it standalone (outside of Qt Creator), I can do that by launching a CMD window, and type:

                        cd C:\Users\User\Documents\build-untitled-Qt_5_15_0_for_UWP_64bit_MSVC_2019-Release\release>
                        C:\Qt\5..15.0\\winrt_x64_msvc2019\bin\winrtrunner.exe --start untitled.exe
                        qt.winrtrunner: Using the Appx profile.
                        qt.winrtrunner: Package already installed.
                        qt.winrtrunner: App started with process ID 4032
                        

                        Note: windeployqt is not needed and I don't touch the AppxManifest.xml file.
                        But if you repeat my procedure, the untitled.exe will not start for you?

                        T Offline
                        T Offline
                        TayMarthin21
                        wrote on 30 Jun 2020, 08:49 last edited by
                        #11

                        @hskoglund Thanks a lot for your help, you are a genius. Ok, trying Release Mode without signing the App nor deployment by hand, I am able to run the app from QT Creator. Just pressing Run button in Release Mode and it displays a window with some widget I put into the Form. From the console, I tried again but a curious thing happens. If I use --start argument the application starts and a blank window appears. When using --test argument, the application starts perfectly, a window with the two widgets I added (EditBox and Radiobutton just for testing). I don't know why in test mode widgets are recognized but not in start mode. It seems like --test command adds some extra libs for debugging, I think that some DLL is missing but with --test command is included...just a suggestion.

                        Thank you very much, this is a great beginning...anyway, it is still pending the installation of the App, but for the moment I have work with this.

                        Thanks again,
                        Kind Regards
                        Tay

                        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