Skip to content

BluetoothHostInfo

Base classes

Name Children Inherits
QBluetoothHostInfo
PySide6.QtBluetooth
QBluetoothHostInfo(self, /) -> None

⋔ Inheritance diagram

graph TD
  3907203840["bluetooth.BluetoothHostInfo"]
  2796536945["QtBluetooth.QBluetoothHostInfo"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  2796536945 --> 3907203840
  37984305 --> 2796536945
  2751680898 --> 37984305

🛈 DocStrings

Bases: QBluetoothHostInfo

Encapsulates the details of a local QBluetooth device.

Source code in prettyqt/bluetooth/bluetoothhostinfo.py
class BluetoothHostInfo(bluetooth.QBluetoothHostInfo):
    """Encapsulates the details of a local QBluetooth device."""

    def set_address(self, address: bluetooth.QBluetoothAddress | int | str):
        """Set address to given value."""
        if isinstance(address, int | str):
            address = bluetooth.QBluetoothAddress(address)
        self.setAddress(address)

    def get_address(self) -> bluetooth.BluetoothAddress:
        """Get address."""
        return bluetooth.BluetoothAddress(self.address())

get_address() -> bluetooth.BluetoothAddress

Get address.

Source code in prettyqt/bluetooth/bluetoothhostinfo.py
def get_address(self) -> bluetooth.BluetoothAddress:
    """Get address."""
    return bluetooth.BluetoothAddress(self.address())

set_address(address: bluetooth.QBluetoothAddress | int | str)

Set address to given value.

Source code in prettyqt/bluetooth/bluetoothhostinfo.py
def set_address(self, address: bluetooth.QBluetoothAddress | int | str):
    """Set address to given value."""
    if isinstance(address, int | str):
        address = bluetooth.QBluetoothAddress(address)
    self.setAddress(address)

:fa-brands-github: Show source on GitHub