Results 1 to 8 of 8

Thread: On MacOSX, QMessage don't accept "\n"

  1. #1
    Join Date
    Jan 2006
    Location
    ha noi - viet nam
    Posts
    24
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default On MacOSX, QMessage don't accept "\n"

    Hi all !
    I use Qt4.0.0. My project use QMessage, i build on Window, All Messages running good with "\n"(down the line) but On MacOSX, I don't do it. I don't know, You can help me ?
    //---------------------------------------

    Full name: Đậu Sỹ Mạnh
    Email: manhds@fsoft.com.vn
    Nationality: Vietname
    Languge: Vietnamese, Janpanese.

    //---------------------------------------

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    Try replacing all the "\n" with QString(QChar('\n'))

    i.e. use

    replace("\\n",QString(QChar('\n')));

    I am not sure if this will work or not.

  3. #3
    Join Date
    Jan 2006
    Location
    ha noi - viet nam
    Posts
    24
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    Quote Originally Posted by munna
    Try replacing all the "\n" with QString(QChar('\n'))

    i.e. use

    replace("\\n",QString(QChar('\n')));

    I am not sure if this will work or not.
    I'm try it but It doesn't run good! I couldn't run to down the line ??
    //---------------------------------------

    Full name: Đậu Sỹ Mạnh
    Email: manhds@fsoft.com.vn
    Nationality: Vietname
    Languge: Vietnamese, Janpanese.

    //---------------------------------------

  4. #4
    Join Date
    Jan 2006
    Location
    South Carolina, USA
    Posts
    34
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    Quote Originally Posted by manhds
    Hi all !
    I use Qt4.0.0. My project use QMessage, i build on Window, All Messages running good with "\n"(down the line) but On MacOSX, I don't do it. I don't know, You can help me ?
    On mac instead of using "\n" use one of these, I can't remember which one.
    "\r"
    "\n\r" or maybe it was "\r\n" I can't remember which.
    Last edited by michael; 7th June 2006 at 06:20.

  5. #5
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    I use QT 4 1.13 on Tiger (mini mac) xcode 2.2 and "\n" works.... fine

  6. #6
    Join Date
    Jan 2006
    Location
    ha noi - viet nam
    Posts
    24
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    Quote Originally Posted by patrik08
    I use QT 4 1.13 on Tiger (mini mac) xcode 2.2 and "\n" works.... fine
    but i'm using QT 4.0.0 on MacOSX and XCode 2.0. Can you help me ?
    //---------------------------------------

    Full name: Đậu Sỹ Mạnh
    Email: manhds@fsoft.com.vn
    Nationality: Vietname
    Languge: Vietnamese, Janpanese.

    //---------------------------------------

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: On MacOSX, QMessage don't accept "\n"

    Upgrade to Qt 4.1.3. Qt 4.0.0 was very buggy.

  8. #8
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: On MacOSX, QMessage don't accept "\n"

    Quote Originally Posted by manhds
    but i'm using QT 4.0.0 on MacOSX and XCode 2.0. Can you help me ?
    to work on xcode 2.2 ( Gnu Make 3.8 ) you must install Tiger 10.4.6 buy by apple or nobuy on limeware...
    Install Xcode 2.2 and qt to /Developer/qt set path .... thats all...

    Panther is so slow ..... Tiger have a better performance.....

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.