C++ (Qt)foreach(int speed, info.standardBauds()) comboBox->addItem(QString::number(speed));
C++ (Qt)class SerialPort{//... enum Rates { Rate9600, Rate19200,//... };//... bool setRate(int rate); int rate() const;//...}; class SerialPortInfo{//... QList<int> standardRates() const;//...};
C++ (Qt)foreach(const SerialPortInfo &info, SerialPortInfo::availablePorts()) comboBox->addItem(info.name());