Hi , trying to enumerate the list of available comports in system into a combobox and i have pasted my code below,
ui->setupUi(this);
foreach (const QSerialPortInfo &serialPortInfo, QSerialPortInfo::availablePorts())
{
foreach (QString s,serialPortInfo.availablePorts())
{
ui->comboBox->addItem(s);
}
}
And i am geeting a error ,
error: conversion from 'const QSerialPortInfo' to non-scalar type 'QString' requested
please give me some solutions to how to sort out this error, Thanks in advance
Bookmarks