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. Using UWP AppService with Qt
Forum Updated to NodeBB v4.3 + New Features

Using UWP AppService with Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 296 Views
  • 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.
  • F Offline
    F Offline
    fbaqt
    wrote on last edited by
    #1

    Hello all,

    I'm attempting to use the Windows Desktop Application Bridge to create a UWP app from an existing Win32 app. Stuffing an existing Win32 app in an appx and running it as a UWP app is easy enough. The problem I am running in to is that I need a protocol handler to be able to launch the UWP app from a web browser. This is proving to be a fair bit more difficult.

    From reading the available documentation, I have come to the conclusion that the "best" way to handle this situation is to peel the Win32 UI off my app and convert it to a background task, then create a UWP UI that calls to the background task to get the work done. It appears that the suggested way to handle this is using an AppService to handle communication between the two parts. That is where the problem shows up.

    According to all of the examples I can find, such as the ones at https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/AppServiceBridgeSample_C%2B%2B, it seems that the way that the UWP app establishes a connection to the Win32 component is via the OnBackgroundActivated event that is part of the XAML Application class.

    Digging around in the Qt source, I can see that the qtmain_winrt.cpp file handles a lot of different events, but doesn't appear to handle the OnBackgroundActivated event. As a result, there doesn't appear to be any (obvious) way for my code to get that event, and use it to start listening on the AppService connection.

    Has anyone else managed to do something like this? Any pointers beyond hacking on the Qt source to add the missing event? (I'd rather not maintain a special branch of Qt along with the source for the app itself.)

    Thanks!

    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