当QComboBox的currentIndex发生变化时,我需要用currentIndex + 1调用一个函数.今天早上我正在努力学习语法:
// call function readTables(int) when currentIndex changes.
connect(ui->deviceBox, SIGNAL(currentIndexChanged()),
SLOT( readTables( ui->deviceBox->currentIndex()+1) );
Run Code Online (Sandbox Code Playgroud)
错误:预期')'SLOT(readTables(ui-> deviceBox-> currentIndex()+ 1));
添加关闭)将无法正常工作......!