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

Qt::WA_ShowWithoutActivating causes a situation where a QLineEdit cursor is blinking but not active

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.6.2
    • None

    Description

      If a QMainWindow calls shows a child non-modal dialog with the Qt::WA_ShowWithoutActivating attribute flag set to true, and that dialog contains a QLineEdit that is given input focus, then hidden and reshown by the parent main window, then the child dialog will be shown with it's QLineEdit cursor blinking as if it had input focus, even though the window is not activated. This can also lead to a situation where there are two input field cursors blinking on two different windows if the Main Window has an input field that had input focus before showing the child dialog. I have attached an example that reproduced this behavior.

      To reproduce with example:

      Click File->Popup...
      Click on the QLineEdit field of the popup dialog to get input focus.
      Click on Tab 2 of the Main Window (hides the dialog)
      Switch back to Tab 1 via clicking or Ctrl + Tab
      Notice how the QLineEdit's cursor is blinking even though the Window is not activated, nor accepting input.

      Attachments

        1. QtX11Movement.tgz
          2 kB
          Andy Nichols
        For Gerrit Dashboard: QTBUG-8857
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change