I tried to access the camera and mic using QWebEngineView so I used this code to grand the access on my Mac
I used the solution which is Here it worked fine when I run the app inside QT and it asks me for the first time on my Mac that QT need to access my Mic and Camera which I allow it and it works, the problem is when I use the release version which has all the needed dependencies and stuff, the app crashes and when I check my system preferences for the permission I did not see the app is listed only QT in both Camer and Mic, and I can't add an app manually.
So what is the solution of this problem? to let the app ask for permission instead of crashes? what edit do I need to do to the codes to allow the app to ask for permission as QT does?
Update What I tried as well is to run the app from executable inside the .app or the package which allow the terminal to request permission to the camera and mic and I worked but this not effective solution to ask the user to do so.
Another test I did is to go to the info.plist inside the .app package and add both
after that I test again, the app not crash but the Camera open and then after 1 or two seconds the Camera close that is it, so I think I need to show the Permission dialog box, any help with it or how to show it up?
after trying many solutions what is worked that I added both permissions to the plist in qt bundle
Privacy - Camra Usage Description
Privacy - Microphone Usage Description
but with values 6.0 or any other value that not have space or long characters, and it worked! and it shows me the permission box and added the app to the privacy in system preferences, maybe long text not let the dialog box show, I am not sure exactly.