PyQt5 Good practices to where define the connection of custom Signals and Slots

tldr

When I emit a signal in script A and catch it script B to execute a slot there. Where should the mysignalA.connect(myslotB) go?
In script A as: self.mysignalA.connect(B.myslotB)
or in script B as: A.mysignalA.connnect(self.myslotB)


Context

My Code is working properly and realiably, but: I have a big project with multiple Qthreads split up over several files and kind of lose track over all the signals/slots. Also multiple people work on it so that doesn’t help either.

In this specific example, I have a thread handling the UDP communication to send status updates to an external system, a thread handling the serial communication to the 3D printer and another thread handling some temperature modelling.
Now both the UDPsend and the temperatureDtThread require the temperature reading of the 3D printer at different rates/times, but I also can’t flood the serial communication with the same request twice so I decided on triggering a SLOT_request_temperature_reading that does some serial communication and translation whenever someone somewhere needs the temperature and then emitting that temperature reading out again through the SIGNAL_temperature_reading to be caught by whoever needs it at this point.


pseudo code

UDPComms.py

class UDPsend(QThread):
    SIGNAL_temperature_req_UDP = pyqtSignal()
    self.SIGNAL_temperature_req_UDP.connect(printer.SLOT_request_temperature_reading)
    printer.SIGNAL_temperature_reading.connect(self.SLOT_get_temperature)

    while True
        #DoSomethingSomething
        if required
            self.SIGNAL_temperature_req_UDP.emit()

    @pyqtslot(float)
    SLOT_get_temperature(temperature_reading):
        self.temperature=temperature_reading #So i can use the temperature in this class now

printer.py

class PrinterThread(QThred):
    SIGNAL_temperature_reading = pyQtSignal(float)

    if Temp_reading_requested = True
        #DoSerialCommunicationAndStuff
        SIGNAL_temperature_reading.emit(mytemperature)

    @pyqtSlot()
    SLOT_request_temperature_reading():
        Temp_reading_requested = True

tempDT.py

class temperatureDtThread(QThread):
    SIGNAL_temperature_req_DT = pyqtSignal()
    self.SIGNAL_temperature_req_DT.connect(printer.SLOT_request_temperature_reading)
    printer.SIGNAL_temperature_reading.connect(self.SLOT_temperature_read_out)

    while True
        #DoSomethingSomething
        if required
            SIGNAL_temperature_req_DT.emit
        
    @pyqtSlot(float)
    SLOT_temperature_read_out(temperature_reading):
        self.temperature=temperature_reading #So i can use the temperature in this class now


Question

So right now in this case I try to do the connections from outside the printer.py, but without much reasoning behind it. Is there a common good practice to where the connection of signals and slots should be defined?

Also: Please just roast my code if I am just misusing signals/slots completely

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật