Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.14.2
-
None
Description
I was recently trying to put together a QDateTimeEdit widget that would update to track the current system time, but would also be capable of being changed by the user to have an offset from the system time.
As such, I needed to detect when they were changing the widget to prevent it from updating. To do this, I simply looked at if the QDateTimeEdit widget hasFocus().
And this worked fine until the QCalendar widget was popped up to select a new date, at this time the hasFocus() for the QDateTimeEdit widget was no longer active.
From a programming perspective the calendar widget is really integral to the QDateTimeEdit widget, so it was surprising that the hasFocus() was no longer active in this situation.