I have a need to read and write from a QT program to a serial port. I would like to maintain platform independence, although my primary platform at this point is Windows
Clearly, QextSerialPort is something I need to look at, and I am doing so, as you will see from questions below. But first...is this the only option available for serial ports and QT? And if so, what version should I be trying to use? It looks like some of the features in qextserialport-1.2win-alpha are not available in non-Windows environments. And needless to say, using "alpha" code is a little worrisome.
And what is the clear answer to whether the "ReadyRead" signal works in what versions and environments? I've been through the threads, and seen lots of conflicting information
Anyway, I am trying to compile the example qespta in the version 1.1 distribution. I am using VS 2005, and QT 4.4.2.
I typed qmake, and then nmake -F Makefile--MessageWindow.cpp gives me the following errors:
./MessageWindow.cpp(93) : error C2061: syntax error : identifier '{ctor}'
./MessageWindow.cpp(121) : error C2061: syntax error : identifier '{ctor}'
here is line 93
msgTextEdit.append(dynamic_cast<MessageEvent::MessageEvent* >(event)->msg);
msgTextEdit.append(dynamic_cast<MessageEvent::MessageEvent* >(event)->msg);
To copy to clipboard, switch view to plain text mode
here is line 121
QCoreApplication::postEvent(this, new MessageEvent::MessageEvent(qmsg));
To copy to clipboard, switch view to plain text mode
the constructor for MessageEvent looks like this:
MessageEvent
::MessageEvent(QString & msg
): QEvent(static_cast<QEvent
::Type>
(MessageWindow
::MessageEvent)) {
this->msg = msg;
}
MessageEvent::MessageEvent(QString & msg):
QEvent(static_cast<QEvent::Type>(MessageWindow::MessageEvent))
{
this->msg = msg;
}
To copy to clipboard, switch view to plain text mode
clearly this code works in some environments, but doesn't in mine. Has anybody seen it? I want to concentrate on my task, and not on the example code, but also want to be sure things are working
thanks very much in advance
Jonathan Howland
Bookmarks