Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Cannot hide mouse cursor in Xbox One app targeting 10.0.14393.0
Forum Updated to NodeBB v4.3 + New Features

Cannot hide mouse cursor in Xbox One app targeting 10.0.14393.0

Scheduled Pinned Locked Moved Unsolved Game Development
5 Posts 2 Posters 3.1k 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.
  • B Offline
    B Offline
    Besidge
    wrote on last edited by Besidge
    #1

    I have a simple app targeting UWP containing a WebView, that I'm testing on the Xbox One. One thing which is bothering me and which I cannot seem to get rid of is the mouse cursor. That means that users cannot use the gamepad to do directional navigation between UI elements. On a regular XAML app, you are supposed to disable mouse mode at startup by calling Application.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested, as detailed in https://blogs.windows.com/buildingapps/2016/09/09/tailoring-your-app-for-xbox-and-the-tv-app-dev-on-xbox-series/ (section 1. Optimize for the Gamepad) . Unfortunately Application.Current doesn't seem to be available on Qt apps (throws an exception with E_NOINTERFACE).

    Is this a known issue with Qt on the Xbox One with the Anniversary Update?

    P.S.: looking at the code for the AppContainer constructor, it seems an Application object is indeed created (but not saved), but for some reason it is not accessible through the Application.Current property.

    1 Reply Last reply
    0
    • tekojoT Offline
      tekojoT Offline
      tekojo
      wrote on last edited by
      #2

      Hi @Besidge and welcome!

      This is a pretty hard one, as I'm not aware of many people working on XBone.
      So lets ping @mkalinow if he happens to read here occasionally.

      Otherwise I would ask this on the Qt Interest mailing list: http://lists.qt-project.org/mailman/listinfo/interest

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Besidge
        wrote on last edited by
        #3

        I did a test subsequently, by copying the whole WinMain and AppContainer code to my project and tried to query the IApplication interface to an IApplication2 interface, and that still returned E_NOINTERFACE, so not really sure what could be done from the Qt side, other than instantiating the Application as a full-fledged XAML application.

        B 1 Reply Last reply
        0
        • B Besidge

          I did a test subsequently, by copying the whole WinMain and AppContainer code to my project and tried to query the IApplication interface to an IApplication2 interface, and that still returned E_NOINTERFACE, so not really sure what could be done from the Qt side, other than instantiating the Application as a full-fledged XAML application.

          B Offline
          B Offline
          Besidge
          wrote on last edited by
          #4

          @Besidge @mkalinow my contact at Microsoft looked at the code and doesn't understand why a XAML Application object is being created, instead of the lower level Windows::ApplicationModel::Core::IFrameworkView. Granted, neither him nor me are well-versed enough in Qt to understand why this decision was made. Using a XAML application will put the app automatically in mouse mode on the XB1, which is rarely wanted.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Besidge
            wrote on last edited by
            #5

            @Besidge, @mkalinow: I was able to reproduce this problem with a short sample project built from a VS template. The only way I was able to disable mouse mode (by accessing the RequiresPointerMode property) was to create a real ::Windows::UI::Xaml::Application-derived class, instead of resorting to Xaml::IApplicationFactory like Qt currently does. It seems that Xaml::IApplicationFactory creates an older style object which doesn't implement the IApplication2 interface.

            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