这是我与QRadioButton的连接。
connect( radioButtonTransformationLocal, SIGNAL(toggled(bool)), this, SLOT(OnTransformationModeChanged()));
现在我正尝试切换到现代语法,但是出现信号和插槽不匹配的错误
connect(radioButtonLeftAlignX, QOverload<bool>::of(&QRadioButton::toggle), this, &WavefrontRenderer::radioButtonLeftAlignX);
我也尝试过
connect(radioButtonLeftAlignX, &QRadioButton::toggle, this, &WavefrontRenderer::radioButtonLeftAlignX);
答案 0 :(得分:1)
将“ toggle”替换为“ toggle d ”:
connect(radioButtonLeftAlignX, QOverload<bool>::of(&QRadioButton::toggled), this, &WavefrontRenderer::radioButtonLeftAlignX);