|
- void MainWindow::on_conBtn_clicked()
- {
- icdev = fun.dc_init(100, 115200);
- qDebug()<<icdev<<endl;
- #if 1
- if (icdev < 0){
- //写了这句程序就崩溃了.
- //QMessageBox::information(this, tr("USB连接"), tr("连接失败,请检查连接是否正常"));
- return;
- } else if (icdev > 0){
- //在这里就没有问题了.
- QMessageBox::information(this, tr("USB连接"), tr("连接成功"),QMessageBox::Ok);
- }
- #endif
- }
复制代码 |
|