Results 1 to 2 of 2

Thread: QTableView and QtimeEdit delegate: time display flips back to 12 hour format

  1. #1
    Join Date
    Apr 2009
    Location
    the Netherlands
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableView and QtimeEdit delegate: time display flips back to 12 hour format

    I'm using QTableView width different types of (converted) delegates amongst others a QTimeEdit for editing time in 24 hour format.

    When I edit the time, using the QTimeEdit controls or directly by typing the numbers, the delegate display the time correctly in 24 hour format as I asked it to. However when I'm done editing and confirm this by pressing return, the QTimeEdit delegate closes and the time is displayed in 12 hour format again in the QTableView.

    1) How can I make the QTableView (in combination with QStandardItemModel) display the time in 24 hour format just like I edited it?
    2) Is this normally done in the updateEditorGeometry delegate function?

    Thanks four your help,
    Alwin

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

    Default Re: QTableView and QtimeEdit delegate: time display flips back to 12 hour format

    How does the paint() reimplementation for your custom delegate look like?
    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.


Tags for this Thread

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.