Qt6.5 QPermission
Marko Luther
marko.luther at gmx.net
Mon May 22 06:46:37 BST 2023
Dear Phil,
> On 21. May 2023, at 17:07, Phil Thompson <phil at riverbankcomputing.com> wrote:
>
> On 16/05/2023 17:26, Marko Luther wrote:
>> Dear Phil,
>> shouldn't the QPermission class be available in QtCore, or is the
>> QPermission API not yet supported by PyQt6?
>>>>> from PyQt6.QtCore import QBluetoothPermission
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> ImportError: cannot import name 'QBluetoothPermission' from
>> 'PyQt6.QtCore'
>> (/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/PyQt6/QtCore.abi3.so)
>
> It isn't supported by PyQt6. It isn't supported on Linux and Windows anyway and for macOS you have to include entries in the Info.plist file. I'm not sure how practical that is.
That Info.plist entry is required anyhow. I am using QBluetooth and without that Info.plist as well as the permission granted by the user this API cannot be use on macOS. Thus the request for permission dialog of the OS pops up also without operating this Permission API. That Permission API allows an app to control this permission granting process.
> Suggestions welcome.
I am not an expert on anything thus I am not suggesting anything here, but I would bet that similar permission granting methods will popup under Linux and Windows soon, similar to those already supported on macOS, iOS, Android and WebAssembly.
Best,
Marko
>
> Phil
More information about the PyQt
mailing list