I have a slot:
Qt Code:
void myClass::on_eptErrorDSpin_valueChanged() { updateDesignMapQDoubleSpinBox(ui->eptErrorDSpin); }To copy to clipboard, switch view to plain text mode
for a QDoubleSpin widget whose objectName is eptErrorDSpin. The function updateDesignMapQDoubleSpinBox() expects a pointer to QDoubleSpin object, which is accomplished by using ui->eptErrorDSpin in the call. Out of curiosity, is there an "easier" way for me to obtain the pointer to eptErrorDSpin? For example, does a slot know anything of the caller that emitted the signal? Put another way, can a slot obtain the pointer of the widget that emitted the signal without explicitly having to specify it as I have done above or is there another, more general, approach that I can use?
I was tinkering with the this pointer but don't know much about it.
Thanks!
Bookmarks