Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2468

Qt Permission API does not work with PySide6 on macOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.7.0, 6.6.3
    • 6.5.0
    • PySide
    • None
    • macOS
    • 5958adfeb (dev), 6b8ca656b (dev), cf318364e (dev), 105464274 (6.6), 45d03020d (dev)

      related to https://codereview.qt-project.org/c/pyside/pyside-setup/+/502839

       
      macOS is tricky though because when you try to requestPermission it gives you an error message saying to add the necessary flags __ to the Info.plist of the application. This is also evident from the release post: .https://www.qt.io/blog/permission-apis-in-qt-6.5

      On Apple platforms each permission you request must be accompanied by a so called usage description string in the application's Info.plist file. For example:

       
      <key>NSMicrophoneUsageDescription</key>
      <string>The microphone is used to record voice memos.</string>

       
      for Python, this means manually modifying the Info.plist file of the Python interpreter since in our case the application is the Python interpreter itself. 
       
      A possible hack similar to https://codereview.qt-project.org/c/pyside/pyside-setup/+/497613 should be investigated.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shpremna Shyamnath Premnadh
            shpremna Shyamnath Premnadh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: