Results 1 to 2 of 2

Thread: Windows newline

  1. #1
    Join Date
    Aug 2007
    Posts
    6
    Thanks
    4

    Default Windows newline

    Hello all,

    I'm programming on Linux, and I want to be able to choose the end of line, for example in windows is used "\r\n" and on linux is used "\n".

    I've tried to replace all the newline characters to "\r\n" but with no luck.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Windows newline

    Declare a variable and use #ifndef #define to set the variable to the desired newline character after checking for the operating system you are using. Also look at http://doc.trolltech.com/4.3/qchar.h...Character-enum ... (QChar::LineSeparator) since it might be of interest to you.

  3. The following user says thank you to momesana for this useful post:

    indifference (29th August 2007)

Similar Threads

  1. Deploying with MySQL support under Windows
    By KShots in forum Installation and Deployment
    Replies: 1
    Last Post: 12th October 2006, 09:19
  2. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  3. Experience using KDevelop with Cygwin under windows
    By high_flyer in forum General Discussion
    Replies: 4
    Last Post: 11th September 2006, 16:50
  4. qt and mingw can not run on windows 98?
    By evewei in forum Installation and Deployment
    Replies: 4
    Last Post: 26th June 2006, 09:22
  5. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 17:15

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.