UDP Connection to QGC

I am working on the raspberry pi zero w to communicate with pixhawk4 via mavlink so I established a connection between rasp and pixhawk through UART and when I am connecting in QGC UDP connection is not working and when I done with TCP , in the terminal it is showing connection accepted, but it is not connecting to QGC.
Note: Rasp and PC connected to same wifi router