You can pass the pointer of a QSerialPort object or use the signals and slots mechanism.