Qt调起Mac“系统设置”面板

mac系统设置相关字段:

Accessibility 面板相关

项目

URL Scheme

Main

x-apple.systempreferences:com.apple.preference.universalaccess

Display

x-apple.systempreferences:com.apple.preference.universalaccess?Seeing_Display

Zoom

x-apple.systempreferences:com.apple.preference.universalaccess?Seeing_Zoom

VoiceOver

x-apple.systempreferences:com.apple.preference.universalaccess?Seeing_VoiceOver

Descriptions

x-apple.systempreferences:com.apple.preference.universalaccess?Media_Descriptions

Captions

x-apple.systempreferences:com.apple.preference.universalaccess?Captioning

Audio

x-apple.systempreferences:com.apple.preference.universalaccess?Hearing

Keyboard

x-apple.systempreferences:com.apple.preference.universalaccess?Keyboard

Mouse & Trackpad

x-apple.systempreferences:com.apple.preference.universalaccess?Mouse

Switch Control

x-apple.systempreferences:com.apple.preference.universalaccess?Switch

Dictation

x-apple.systempreferences:com.apple.preference.universalaccess?SpeakableItems

分享

项目

URL Scheme

Main

x-apple.systempreferences:com.apple.preferences.sharing

Screen Sharing

x-apple.systempreferences:com.apple.preferences.sharing?Services_ScreenSharing

File Sharing

x-apple.systempreferences:com.apple.preferences.sharing?Services_PersonalFileSharing

Printer Sharing

x-apple.systempreferences:com.apple.preferences.sharing?Services_PrinterSharing

Remote Login

x-apple.systempreferences:com.apple.preferences.sharing?Services_RemoteLogin

Remote Management

x-apple.systempreferences:com.apple.preferences.sharing?Services_ARDService

Remote Apple Events

x-apple.systempreferences:com.apple.preferences.sharing?Services_RemoteAppleEvent

Internet Sharing

x-apple.systempreferences:com.apple.preferences.sharing?Internet

Bluetooth Sharing

x-apple.systempreferences:com.apple.preferences.sharing?Services_BluetoothSharing

安全&隐私相关

项目

URL Scheme

Main

x-apple.systempreferences:com.apple.preference.security

General

x-apple.systempreferences:com.apple.preference.security?General

FileVault

x-apple.systempreferences:com.apple.preference.security?FDE

Firewall

x-apple.systempreferences:com.apple.preference.security?Firewall

Advanced

x-apple.systempreferences:com.apple.preference.security?Advanced

Privacy

x-apple.systempreferences:com.apple.preference.security?Privacy

Privacy-Accessibility

x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility

Privacy-Assistive

x-apple.systempreferences:com.apple.preference.security?Privacy_Assistive

Privacy-Location Services

x-apple.systempreferences:com.apple.preference.security?Privacy_LocationServices

Privacy-Contacts

x-apple.systempreferences:com.apple.preference.security?Privacy_Contacts

Privacy-Diagnostics & Usage

x-apple.systempreferences:com.apple.preference.security?Privacy_Diagnostics

Privacy-Calendars

x-apple.systempreferences:com.apple.preference.security?Privacy_Calendars

Privacy-Reminders

x-apple.systempreferences:com.apple.preference.security?Privacy_Reminders

Privacy-Facebook

x-apple.systempreferences:com.apple.preference.security?Privacy_Facebook

Privacy-LinkedIn

x-apple.systempreferences:com.apple.preference.security?Privacy_LinkedIn

Privacy-Twitter

x-apple.systempreferences:com.apple.preference.security?Privacy_Twitter

Privacy-Weibo

x-apple.systempreferences:com.apple.preference.security?Privacy_Weibo

Privacy-Tencent Weibo

x-apple.systempreferences:com.apple.preference.security?Privacy_TencentWeibo

用Qt去调起时,代码如下:

复制代码
void openSetting()
复制代码
{
复制代码
    NSString *urlString = @"x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture";
复制代码
    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:urlString]];
复制代码
}
复制代码
复制代码
void openSettingToGeneral()
复制代码
{
复制代码
    NSString *urlString = @"x-apple.systempreferences:com.apple.preference.security?General";
复制代码
    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:urlString]];
复制代码
}

第一个时定位到获取录屏权限

第二个是定位到通用设置

相关推荐
奋斗的小花生1 小时前
c++ 多态性
开发语言·c++
闲晨2 小时前
C++ 继承:代码传承的魔法棒,开启奇幻编程之旅
java·c语言·开发语言·c++·经验分享
UestcXiye3 小时前
《TCP/IP网络编程》学习笔记 | Chapter 3:地址族与数据序列
c++·计算机网络·ip·tcp
Mr.Q4 小时前
Qt多边形填充/不填充绘制
qt
霁月风4 小时前
设计模式——适配器模式
c++·适配器模式
jrrz08285 小时前
LeetCode 热题100(七)【链表】(1)
数据结构·c++·算法·leetcode·链表
可峰科技5 小时前
斗破QT编程入门系列之二:认识Qt:编写一个HelloWorld程序(四星斗师)
开发语言·qt
咖啡里的茶i5 小时前
Vehicle友元Date多态Sedan和Truck
c++
海绵波波1075 小时前
Webserver(4.9)本地套接字的通信
c++
@小博的博客5 小时前
C++初阶学习第十弹——深入讲解vector的迭代器失效
数据结构·c++·学习