F
F
frontjss2020-03-20 11:37:18
Python
frontjss, 2020-03-20 11:37:18

What are slots for in pyqt5?

Can you give an example why slots are needed in pyqt5?
@pyqtSlot()

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alternativshik, 2020-03-20
@alternativshik

in order to receive signals

B
bbkmzzzz, 2020-03-21
@bbkmzzzz

A slot can be any function.method. But using a decorator explicitly marks the method as a slot, which allows Qt to create entities for the slot. Slightly reduces memory consumption and slightly speeds up slots.
tyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question