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

Focus chain in qwidget and qquickwidget cause GUI frozen

    XMLWordPrintable

Details

    • Linux/X11, Linux/Other display system

    Description

      1, Create a qwidget call it "Root"

      2,create another qwidget, and set its parent to "Root". let me call it "child Widget",add buttons on it, set the focuspolicy of the buttons to strongfocus. set one button's focus to true.

      3,create another qquickwidget, set its parent to "Root",let me call it "chid quickwidget".

      4, add Rectangle to child quickwidget. set the focus of the rectangle to "true", set activeFocusOnTab to "true".

      5, run the application.

      6, press tab to switch focus, the focus will follow the focus chain, and go to the child quickwidget ,then press tab, will cause gui frozen. And it will print following sentence endlessly.

      "qt.quick.focus: QQuickItemPrivate::nextPrevItemInTabFocusChain: from: MainScreen_QMLTYPE_1(0x28a7870, parent=0x25caba0, geometry=0,0 800x600)
      qt.quick.focus: QQuickItemPrivate::nextPrevItemInTabFocusChain: current: MainScreen_QMLTYPE_1(0x28a7870, parent=0x25caba0, geometry=0,0 800x600)
      qt.quick.focus: QQuickItemPrivate::nextPrevItemInTabFocusChain: from: QQuickMouseArea_QML_2(0x28a7a90, parent=0x28a7870, geometry=0,0 800x600)
      qt.quick.focus: QQuickItemPrivate::nextPrevItemInTabFocusChain: current: ButtonView_QMLTYPE_0(0x28c00e0, parent=0x28a7870, geometry=0,0 800x600)
      qt.quick.focus: QQuickItemPrivate::nextPrevItemInTabFocusChain: from: MainScreen_QMLTYPE_1(0x28a7870, parent=0x25caba0, geometry=0,0 800x600)"

       Please see the attachment.

      I find that, when I transfer the focus between qwidget and qquickwidget, , it will always cause a frozen.

       

      Test environment: Ubuntu 16.04

       

       

       

      Attachments

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

        Activity

          People

            tvete Paul Olav Tvete
            yorkchenqt1989 York Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes