Results 1 to 8 of 8

Thread: serial port issues

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Location
    Falmouth, MA, USA
    Posts
    34
    Thanks
    4
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default serial port issues

    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

    Qt Code:
    1. msgTextEdit.append(dynamic_cast<MessageEvent::MessageEvent* >(event)->msg);
    To copy to clipboard, switch view to plain text mode 

    here is line 121

    Qt Code:
    1. QCoreApplication::postEvent(this, new MessageEvent::MessageEvent(qmsg));
    To copy to clipboard, switch view to plain text mode 

    the constructor for MessageEvent looks like this:

    Qt Code:
    1. MessageEvent::MessageEvent(QString & msg):
    2. QEvent(static_cast<QEvent::Type>(MessageWindow::MessageEvent))
    3. {
    4. this->msg = msg;
    5. }
    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
    Last edited by jpn; 8th January 2009 at 17:27. Reason: missing [code] tags

Similar Threads

  1. serial port programming
    By sujatashooter in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2008, 15:51
  2. accessing serial port without CONFIG += console
    By bnilsson in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 21:47
  3. serial port communiction
    By jagadish in forum Qt Programming
    Replies: 4
    Last Post: 7th July 2007, 12:04
  4. First attempt to display serial port data on GUI
    By ShaChris23 in forum Newbie
    Replies: 12
    Last Post: 4th May 2007, 09:14
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.