I have subclassed QDateTimeEdit for viewing the current date and time. User has also ability to change the date/time. As my system has no mouse I was wondering how do I set a specific section as selected (highlighted or similar so the user can see which section he is about to change). Key presses are used for selecting the section to be changed on QDateTimeEdit and for changing the current section value.

The problem is that user cant see which section is selected, at least not until he changes the value and the section where QDateTimeEdit::setCurrentSection() is set to be pointing gets highlighted.
The logic on changing the date/time is ok now, but I dont know how to set the section selected for user point of view, as in the way it gets higlighted when you change the value by stepUp(), stepDown() or stepBy().

Surely I could just do

Qt Code:
  1. stepUp();
  2. stepDown();
To copy to clipboard, switch view to plain text mode 

to get the section highlighted, but that would mess up setting the dates when it's 1st or last day of the month and wrapping is set to false. And If i set the wrapping on, it only works when decreasing values (on date field: 2->1->31->30), not when they are increased (on datefield: 30->31->31->31).

I thought that QDateTimeEdit::setCurrentSection() would do the trick of highlighting the current section, but I was wrong.

I'm using Qt 4.1 on linux.