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]];
复制代码
}

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

第二个是定位到通用设置

相关推荐
小狗爱吃黄桃罐头19 分钟前
《C++ Primer Plus》模板类 Template 课本实验
c++
码力码力我爱你3 小时前
Harmony OS C++实战
开发语言·c++
Vect__3 小时前
别再只懂 C++98!C++11 这7个核心特性,直接拉开你与普通开发者的差距
c++
想唱rap3 小时前
C++ map和set
linux·运维·服务器·开发语言·c++·算法
小欣加油4 小时前
leetcode 1018 可被5整除的二进制前缀
数据结构·c++·算法·leetcode·职场和发展
玖剹5 小时前
递归练习题(四)
c语言·数据结构·c++·算法·leetcode·深度优先·深度优先遍历
西部秋虫6 小时前
YOLO 训练车牌定位模型 + OpenCV C++ 部署完整步骤
c++·python·yolo·车牌识别
雾岛听蓝8 小时前
C++ 类和对象(一):从概念到实践,吃透类的核心基础
开发语言·c++·经验分享·笔记
Dream it possible!8 小时前
LeetCode 面试经典 150_图_克隆图(90_133_C++_中等)(深度优先:DFS)
c++·leetcode·面试·
鸭子程序员9 小时前
c++ 算法
开发语言·c++·算法