Hi all!
The examples show code in Terminal project:
Qt Code:
  1. //in constructor
  2. fillPortsInfo();
  3. //..//
  4. void Settings::fillPortsInfo()
  5. {
  6. ui->serialPortInfoListBox->clear();
  7. foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) {
  8. list << info.portName()
  9. << info.description()
  10. << info.manufacturer()
  11. << info.systemLocation()
  12. << (info.vendorIdentifier() ? QString::number(info.vendorIdentifier(), 16) : QString())
  13. << (info.productIdentifier() ? QString::number(info.productIdentifier(), 16) : QString());
  14.  
  15. ui->serialPortInfoListBox->addItem(list.first(), list);
  16. }
  17. }
  18. }
To copy to clipboard, switch view to plain text mode 
How can I display the current port in the QComboBox (serialPortInfoListBox) that I take from the config.ini file?
Now I have the first (or last) port from the list of ports.