Results 1 to 3 of 3

Thread: How to set QTimeEdit to display in 24 hour format

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to set QTimeEdit to display in 24 hour format

    It displays in 24h format for me by default. I guess this is a matter of locale.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Oct 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QTimeEdit to display in 24 hour format

    I declared an instance of QLocale with country = Poland and then extracted the time display format string. Turns out all I had to do was use "HH:mm:ss" as the QTimeEdit display format. The default in the US is "hh:mm:ss AP".

    Thanks,

    Dick

Similar Threads

  1. QDateEdit Resize for Changed Display Format?
    By ChrisW67 in forum Newbie
    Replies: 5
    Last Post: 5th June 2009, 10:02
  2. Replies: 1
    Last Post: 15th April 2009, 09:00
  3. How can you display binary data in hex format?
    By Cruz in forum Qt Programming
    Replies: 2
    Last Post: 4th February 2009, 14:40
  4. how to display images in mosaic format?
    By Nithya in forum Qt Programming
    Replies: 14
    Last Post: 24th April 2008, 06:41
  5. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48

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.