Results 1 to 3 of 3

Thread: accessing serial port without CONFIG += console

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default accessing serial port without CONFIG += console

    I am trying to access a Windows serial port, and it works if I have CONFIG += console in the .pro file, but not without this switch.
    Since I do not want the console window in my final app, this is a problem.
    What could be the reason?

    I am using

    Qt Code:
    1. hComPort = CreateFile( sPortWText,
    2. GENERIC_READ|GENERIC_WRITE,
    3. 0,
    4. 0,
    5. OPEN_EXISTING,
    6. 0,
    7. NULL);
    To copy to clipboard, switch view to plain text mode 
    an exaple snip form the code.
    I am not using any references to QIODevice in the serial port code.
    I am porting some (working) code from another context in to a Qt app, and I have left the serial port part untouched.
    It compiles and runs in my Qt app, but I only get working I/O if I have CONFIG += console.

    BN
    Last edited by bnilsson; 21st July 2008 at 16:48.
    MacOSX user dabbling with Linux and Windows.

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.