错误:

D:\qtprojects\mycom\mycom\mainwindow.cpp:23: error: no matching function for call to 'MainWindow::~MainWindow()'
MainWindow::~MainWindow()
^

 

解决: 语法错误,粗心造成: 网络在解析函数后,加 “};”

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    struct PortSettings myComSetting = {BAUD9600,DATA_8,PAR_NONE,STOP_1,FLOW_OFF,500};

    myCom = new  Win_QextSerialPort("com1",myComSetting,QextSerialBase::EventDriven);


    myCom ->open(QIODevice::ReadWrite);


    connect(myCom,SIGNAL(readyRead()),this,SLOT(readMyCom));
}


MainWindow::~MainWindow()
{
       delete ui;
};



我想用QT来写http://code.google.com/p/qextserialport/downloads/list?can=1&q=

相关文章: