Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 802B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @file main.cpp
  3. * @brief Main file.
  4. * @author Micha? Policht
  5. */
  6. //! [0]
  7. #include "qextserialenumerator.h"
  8. //! [0]
  9. #include <QtCore/QList>
  10. #include <QtCore/QDebug>
  11. int main()
  12. {
  13. //! [1]
  14. QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
  15. //! [1]
  16. qDebug() << "List of ports:";
  17. //! [2]
  18. foreach (QextPortInfo info, ports) {
  19. qDebug() << "port name:" << info.portName;
  20. qDebug() << "friendly name:" << info.friendName;
  21. qDebug() << "physical name:" << info.physName;
  22. qDebug() << "enumerator name:" << info.enumName;
  23. qDebug() << "vendor ID:" << info.vendorID;
  24. qDebug() << "product ID:" << info.productID;
  25. qDebug() << "===================================";
  26. }
  27. //! [2]
  28. return 0;
  29. }