C++ (Qt)void MainWindow::on_comboBox_currentIndexChanged( int value ){ int result = value + chtoto; label->setText( QString::number( result ) );}
C++ (Qt)void MainWindow::on_comboBox_currentIndexChanged( int index ){ QString itemStr = comboBox->itemText(index); bool ok; int value = itemStr.toInt(&ok); if (!ok) return; int result = value + chtoto; label->setText( QString::number( result ) );}
C++ (Qt)label->setNum( result );