Results 1 to 3 of 3

Thread: Setting locale for the whole app

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Setting locale for the whole app

    Hi guys,

    I have problem with strings containing "," rather then "." when storing/reading double values as strings. How to change application QString locale settings to read/write double in string using '.'? I suppose that German locale settings use ',' for storing/reading float in QString, but some other languages use '.'. While using Qt 4.3.4 I had '.', after porting to Qt 4.4.0 (polish settings) I have ','. How to change the settings?

    Thanks.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    Apr 2006
    Location
    Minsk, Belarus
    Posts
    33
    Thanks
    2
    Thanked 6 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Setting locale for the whole app

    Quote Originally Posted by maverick_pol View Post
    How to change the settings?
    http://www.cplusplus.com/reference/c...setlocale.html

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Setting locale for the whole app

    See QLocale.

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.