• 4693阅读
  • 1回复

请问qt3.3.4下QextSerialPort的问题 [复制链接]

上一主题 下一主题
离线712100
 

只看楼主 倒序阅读 楼主  发表于: 2007-01-16
主函数如下,其它是下载QextSerialPort的类,版本0.9,用的是qt3.3.7
#include <qapplication.h>
#include <qlabel.h>
#include "win_qextserialport.h"
int main(int argc , char **argv)
{
QApplication myApp(argc,argv);
QLabel myLabel("Hello",0);
Win_QextSerialPort *RS232 = new Win_QextSerialPort("/dev/ttyS0");
RS232->setBaudRate(BAUD115200); //com1,115200,n,8,1
RS232->setFlowControl(FLOW_OFF);
RS232->setParity(PAR_NONE);
RS232->setDataBits(DATA_8 );
RS232->setStopBits(STOP_1);

if (RS232->open())
{
    RS232->putch('a');
    RS232->putch('a');
    RS232->flush();
    RS232->close();
}
myApp.setMainWidget(&myLabel);
myLabel.show();
return myApp.exec();
}
编译通过了,但是发不出来数据,请问高手是怎么回事情?
[ 此贴被XChinux在2007-01-22 00:08重新编辑 ]
离线gangwa
只看该作者 1楼 发表于: 2009-05-17
请问  如何编译的qextserialport?  
快速回复
限100 字节
 
上一个 下一个