Skip to content

BluetoothHostInfo

Qt Base Class: QBluetoothHostInfo

Signature: QBluetoothHostInfo(self) -> None QBluetoothHostInfo(self, other: PySide6.QtBluetooth.QBluetoothHostInfo) -> None

Base classes

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

⋔ Inheritance diagram

🛈 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)