Home · All Classes ·
  • Examples
  • enumerator Demo
  • enumerator Demo

    Files:

    The example demonstrates how to use QextSerialEnumerator.

    Include the proper header file

        #include "qextserialenumerator.h"

    Get available ports in the system.

        QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();

    Output

        foreach (QextPortInfo info, ports) {
            qDebug() << "port name:"       << info.portName;
            qDebug() << "friendly name:"   << info.friendName;
            qDebug() << "physical name:"   << info.physName;
            qDebug() << "enumerator name:" << info.enumName;
            qDebug() << "vendor ID:"       << info.vendorID;
            qDebug() << "product ID:"      << info.productID;
    
            qDebug() << "===================================";
        }


    Copyright © 2000-2012 QextSerialPort Project
    QextSerialPort Manual