이 페이지에서

변경 사항 Qt Bluetooth

Qt 6의 변경 사항은 프레임워크를 더 효율적이고 사용하기 쉽게 만들기 위한 의도적인 노력의 결과입니다.

저희는 각 릴리스에서 모든 공개 API에 대해 바이너리 및 소스 호환성을 유지하기 위해 노력하고 있습니다. 하지만 Qt를 더 나은 프레임워크로 만들기 위한 노력의 일환으로 일부 변경 사항은 불가피했습니다.

이 항목에서는 QtBluetooth 의 변경 사항을 요약하고, 이를 처리하기 위한 지침을 제공합니다.

일반

  • qbluetoothglobal.h가 제거되었습니다. qtbluetoothglobal.h는 동일한 용도를 가진 공식 헤더 파일입니다.
  • QVector 의 모든 사용처는 QList 로 대체되었습니다.
  • Win32 백엔드가 제거되었습니다. mingw로 Qt를 빌드할 경우 작동하는 블루투스 백엔드가 없을 것입니다.
  • 이제 Windows 백엔드가 하나뿐이므로, 로깅 범주 qt.bluetooth.winrt가 제거되었습니다. 해당 로그 메시지는 이제 qt.bluetooth.windows에 있습니다.

QBluetooth 네임스페이스

유형 안전성을 향상시키기 위해 ` QBluetooth::Security ` 및 ` QBluetooth::AttAccessConstraint ` 열거형이 범위 지정 열거형으로 변경되었습니다.

QBluetoothDeviceDiscoveryAgent

QBluetoothDeviceDiscoveryAgent::inquiryType 속성 및 관련 세터/게터와 열거형이 제거되었습니다. 이 API 요소는 구현되거나 지원된 적이 없습니다.

QBluetoothDeviceInfo

  • manufacturerData()는 QHash 대신 QMultiHash 를 반환합니다. Qt 6부터 QMultiHash 는 더 이상 QHash 에서 파생되지 않습니다.
  • DataCompleteness는 관련 API 요소들이 더 이상 목적을 달성하지 못하게 되어 대체 없이 제거되었습니다.
  • setServiceUuids(const QList<QBluetoothUuid>, DataCompleteness)는 setServiceUuids(const QList<QBluetoothUuid> &uuids)로 대체되었습니다.
  • DataCompleteness serviceUuidsCompleteness() const는 대체 없이 제거되었습니다.
  • QList<QBluetoothUuid> serviceUuids(DataCompleteness *completeness = nullptr) const는 QList<QBluetoothUuid> serviceUuids() const로 대체되었습니다.

QBluetoothLocalDevice

페어링 에이전트 관련 API가 대체 기능 없이 제거되었습니다. 여기에는 pairingConfirmation(bool), pairingDisplayPinCode(..) 및 pairingDisplayConfirmation(..)이 포함됩니다. Android와 BlueZ 4를 제외하고는 이에 대한 구현이 한 번도 없었습니다. Qt 6에서 BlueZ 4 지원이 제거되었으며, Android의 구현은 코드의 적어도 일부에 대해 획득할 수 없는 BLUETOOTH_PRIVILEGED 권한을 필요로 했습니다.

QLowEnergyService

ServiceState 열거형 값의 이름이 다음과 같이 변경되었습니다:

이 변경은 향후 서비스 검색이 선택적 단계가 될 수 있음을 예상하여 이루어졌습니다.

QBluetoothUuid

열거형 ProtocolUuid, ServiceClassUuid, CharacteristicType 및 DescriptorType 은 이제 범위 지정 열거형이 되었습니다. 사용자 코드에서 열거형 항목의 사용법을 조정해야 합니다.

QLowEnergyController

  • 원격 QBluetoothAddress 매개변수를 사용하는 기존의 생성자 및 create*() 함수가 제거되었습니다. Apple 시스템에서는 QBluetoothAddress 만으로는 원격 장치를 식별하기에 충분하지 않습니다. 장치를 "명명"하기 위해서는 UUID가 필요합니다. 이는 QBluetoothDeviceInfo 를 통해서만 충족될 수 있습니다.
  • 남아 있는 QLowEnergyController 생성자들은 private으로 변경되었습니다. QLowEnergyController 인스턴스를 얻으려면 createPeripheral() 및 createCentral() 함수를 사용해야 합니다.

QLowEnergyCharacteristic

  • 클라이언트 특성 구성 디스크립터(Client Characteristic Configuration Descriptor)를 편리하게 가져올 수 있도록 새로운 메서드 clientCharacteristicConfiguration()이 도입되었습니다.
  • 클라이언트 특성 구성 설명자의 가능한 값을 포함하는 상수 CCCDDisable, CCCDEnableNotification 및 CCCDEnableIndication 가 도입되었습니다.
  • handle() 메서드는 더 이상 공개 Bluetooth LE 인터페이스의 일부가 아닙니다. 특성 식별자로서의 이 메서드의 역할은 대체되었습니다. QLowEnergyCharacteristic 인스턴스 자체가 식별자 역할을 합니다.

QLowEnergyDescriptor

handle() 메서드는 더 이상 공개 Bluetooth LE 인터페이스의 일부가 아닙니다. 디스크립터 식별자로서의 역할은 대체되었습니다. QLowEnergyDescriptor 인스턴스 자체가 식별자 역할을 수행합니다.

QBluetoothTransferManager

QBluetoothTransferManager, QBluetoothTransferRequest 및 QBluetoothTransferReply는 대체 없이 제거되었습니다.

QBluetoothSocket

QBluetoothSocket::SocketState 및 QBluetoothSocket::SocketError 는 이제 범위 지정된 열거형(enum)입니다. 사용자 코드에서 열거형 항목의 사용 방식을 수정해야 합니다.

QML 인터페이스

QML을 통한 소켓 프로그래밍은 권장되지 않으므로 QML 인터페이스가 제거되었습니다. QDeclarativeBluetoothService, QDeclarativeBluetoothSocket 및 QDeclarativeBluetoothDiscoveryModel(QML에서는 BluetoothService, BluetoothSocket 및 BluetoothDiscoveryModel)은 대체 없이 제거되었습니다.

"error" 신호

QBluetoothDeviceDiscoveryAgent, QBluetoothLocalDevice, QBluetoothServer, QBluetoothServiceDiscoveryAgent, QBluetoothSocket, QLowEnergyController 및 QLowEnergyService 의 "error" 시그널은 "error" 시그널과 "error" 게터 간의 모호성을 제거하기 위해 "errorOccurred"로 이름이 변경되었습니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.