PySide2.QtWidgets.
QPushButton
def some_func(): pass button = QPushButton("Print to stdout") button.clicked.connect(some_func)