PDA

View Full Version : syntax signal/slots QT - question



davinciomare
22nd October 2016, 20:23
I have some questions about signal and slots. First thing the syntax look like this:


connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
If i am not wrong:

const QObject *sender-> is the button that start the signal?
const char *signal, -> the signal
const char *method->element receive the signal
Qt::ConnectionType type-> slot
Other question i have, i can call the signal using emit or other way without buttons? thx again!

jefftee
23rd October 2016, 06:17
Please read the doc for QObject::connect and the doc for signals & slots (http://doc.qt.io/qt-5/signalsandslots.html).