def METHOD_NAME(self, dialog: 'TxDialog'):
    b = QPushButton()
    b.setIcon(read_QIcon("speaker.png"))
    def handler():
        blob = dialog.tx.serialize()
        self._send(parent=dialog, blob=blob)
    b.clicked.connect(handler)
    dialog.sharing_buttons.insert(-1, b)