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. QPermission usage question
Forum Updated to NodeBB v4.3 + New Features

QPermission usage question

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 268 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.
  • R Offline
    R Offline
    RogueWarrior
    wrote on last edited by
    #1

    I'm trying to understand why you'd want to use QPermission, specifically QLocationPermission. The docs say the following:

    "Starting from Qt 6.6, the Qt Positioning module uses new QPermission API to handle location permissions. This means that Qt itself no longer queries for these permissions, so this needs to be done directly from the client application."

    But on OSX and iOS apps, you specify in the Info.plist file that your app intends to use the location system (GPS) with one or more NSLocation keys. Android has something similar.

    So, why would you use QPermission at all?

    C 1 Reply Last reply
    0
    • R RogueWarrior

      I'm trying to understand why you'd want to use QPermission, specifically QLocationPermission. The docs say the following:

      "Starting from Qt 6.6, the Qt Positioning module uses new QPermission API to handle location permissions. This means that Qt itself no longer queries for these permissions, so this needs to be done directly from the client application."

      But on OSX and iOS apps, you specify in the Info.plist file that your app intends to use the location system (GPS) with one or more NSLocation keys. Android has something similar.

      So, why would you use QPermission at all?

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @RogueWarrior
      Not every platform a Qt application can be deployed on is Apple or Android.
      Even if your metadata indicates that your application wants GPS access I expect the user can deny it. So, on Mac for example, you appear to still need to check in code that permission is there. This is what I expect QPermission wraps in a platform-agnostic fashion.

      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