The QSpinBox class has two signals with the same name, but different signatures:
void valueChanged(int i) void valueChanged(const QString &text)
Therefore, when writing, the compiler simply does not understand which pointer to which of the overloaded functions should be used:
auto valueChanged = &QSpinBox::valueChanged;
In order to "prompt" to the compiler, this monstrous type function cast is used.
static_cast<void (QSpinBox::*)(int)> (указатель на функцию);
Qt has the ability to use a shorter design for this:
auto valueChanged = QOverload<int>::of(&QSpinBox::valueChanged);
The> symbol is part of the type specification for static_cast.
static_cast<тип_функции>(указатель_на_функцию);