Snippets

Federico Fuga QT New Style of QObject::Connect

Created by Federico Fuga
void SomeObject::make_connections() 
{

// converting when a method overloads

connect(mySpinBox, SIGNAL(valueChanged(int)), mySlider, SLOT(setValue(int));
connect(mySpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), mySlider, &QSlider::setValue);


}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.