Edwin Rodríguez

Castear signal en las nuevas conecciones C++11 de Qt


This is the template

static_cast<return_type(ClassName::*)(arg_type1, arg_type2)>

Example

static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated)

Full example

connect(ui->comboBox, 
        static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
        ps,
        &PlotSystem::requestPlotsAvailable);