PDA

View Full Version : QTableView and QtimeEdit delegate: time display flips back to 12 hour format



alwin
14th April 2009, 16:50
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

wysota
15th April 2009, 10:00
How does the paint() reimplementation for your custom delegate look like?