The program crashes when I try to set qserialport instance setting, such as setBaudRate. it causes segmentation fault.
Qt Code:
  1. #include "mainwindow.h"
  2. #include <QApplication>
  3.  
  4. #include <QtCore/QCoreApplication>
  5. #include <QtCore/QDebug>
  6.  
  7. #include <QtSerialPort/QSerialPort>
  8. #include <QtSerialPort/QSerialPortInfo>
  9.  
  10. QT_USE_NAMESPACE
  11.  
  12. int main(int argc, char *argv[])
  13. {
  14. QApplication a(argc, argv);
  15. MainWindow w;
  16. w.show();
  17.  
  18.  
  19. QSerialPort serial;
  20.  
  21. QString path;
  22.  
  23. path.append("/dev/ttyS0");
  24.  
  25. serial.setBaudRate(QSerialPort::Baud9600);
  26.  
  27. serial.close();
  28.  
  29. return a.exec();
  30. }
To copy to clipboard, switch view to plain text mode 
As my system is Linux, should I use a posix version of the function to open port!
like:
Qt Code:
  1. posix_openpt()
To copy to clipboard, switch view to plain text mode 

i would thank if run the code in your system n see if you get the same segmentation fault when setting port settings.