#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
Go to the source code of this file.
|
#define | CONNECTCAST(class, func, args) static_cast<void(class::*)args>(&class::func) |
|
◆ CONNECTCAST
#define CONNECTCAST |
( |
|
class, |
|
|
|
func, |
|
|
|
args |
|
) |
| static_cast<void(class::*)args>(&class::func) |
Macro for Qt's connect() overload resolution (in case signals/slots are overloaded and we need to tell connect what overload to pick without repeating ourselves. This can be solved in Qt 5.7 by using qOverload<>
- Note
- : provide the brackets for 'args' yourself, since there might be multiple arguments, separated by comma Example: QObject::connect(spinBox, CONNECTCAST(QSpinBox, valueChanged, (double)), slider, &QSlider::setValue);