Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86455

QDateTimeEdit control doesn't indicate hasFocus() when QCalendar widget is active

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.14.2
    • None
    • Windows

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            bevanweiss Bevan Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes