Dup Goto 📝

PySide6

PT2/aw/dev/qt 07-31 13:46:42
To Pop
21 lines, 40 words, 564 chars Monday 2023-07-31 13:46:42

Tutorials

PythonGuisTutorials PySideExamples1 QtPainting PyQtWidgets1 PythonQtOpenGL PySide6Network1

Signal and Slots

button.clicked.connect(self.the_button_was_clicked)
from PySide6.QtNetwork import QUdpSocket, QHostAddress

# udp enabled widget
class Widget(QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.udpSocket = QUdpSocket()
        self.udpSocket.readyRead.connect(self.handle)
        self.udpSocket.bind(QHostAddress.Any,3000)
    def handle(self):
        print("hello")