In my program, the user selects an input file that reads in a file of data tracks. These tracks run for various lengths of time, but always have 1 data point/second. I need to add an ability for the user to select a specific time down to the second to input some comments about the data track. I thought using a QTimeEdit would be the best way to select the time for the comment input. The user selects a data track from a combo box listing the names of all the data tracks in the input file. When they select a track, I grab the maximum and minimum time for the track and set the min and max times for the QTimeWidget. I set the initial value of the QTimeEdit to be the min time. I also have wrapping enabled on my QTimeWidget. This ensures the user picks a valid time for the track.
This causes a huge problem for me. It seemed to be working okay, until I grabbed a file that had a 3 minute data track. This particular data track starts at 11:59:56 and ends at 12:02:10 (in 24 hr format). Unfortunately, when I try to change the time in the QTimeWidget, I can only choose times between 11:59:56-11:59:59. It seems the widget will not let me change the 11 to a 12 since 12:59 is too high. I cannot subsequently change the 59 in the minutes to 00, 01, or 02 since 11:00-11:02 are all too low.
Any ideas what I need to do to the QTimeEdit to get it to allow me to select a time anywhere in my 3-minute window?
Bookmarks