import typing

from . import QtWidgets
from . import QtCore

class QHeaderView:
    @typing.overload
    @staticmethod
    def setSectionResizeMode(
        header: QtWidgets.QHeaderView,
        logicalIndex: int,
        mode: QtWidgets.QHeaderView.ResizeMode,
    ) -> None: ...
    @typing.overload
    @staticmethod
    def setSectionResizeMode(
        header: QtWidgets.QHeaderView, mode: QtWidgets.QHeaderView.ResizeMode
    ) -> None: ...

def delete(obj: object) -> None: ...
def getCppPointer(obj: object) -> typing.Tuple[int, ...]: ...
def isValid(obj: object) -> bool: ...
def loadUi(
    uifile: str, baseinstance: typing.Optional[QtWidgets.QWidget] = ...
) -> QtWidgets.QWidget: ...
def load_ui(
    uifile: str, baseinstance: typing.Optional[QtWidgets.QWidget] = ...
) -> QtWidgets.QWidget: ...
def translate(context: str, sourceText: str, *args: typing.Any) -> str: ...
def wrapInstance(
    address: int, qt_type: type
) -> object | QtCore.QObject | QtWidgets.QWidget: ...

# This module holds many PySide classes for backwards compatibility but they are not type safe.
# Use __getattr__ to prevent spurious mypy errors.
def __getattr__(name: str) -> typing.Any: ...
