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

ASSERT with Keys.forwardTo with 2 elements when used in a C++ application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.1
    • 5.3.0
    • None
    • Windows 7 + QtCreator 3.1.1
    • qtdeclarative#5.3: e897eec27d3e9322e2048db3afae651a79578e85

    Description

      Use following code in a C++ application with QQmlApplicationEngine load method.

      import QtQuick 2.2
      import QtQuick.Window 2.1
      
      Window {
          width: 100
          height: 100
          visible: true
      
          Item {
              focus: true
              Keys.forwardTo: [item1, item2]
          }
          Item {
              id: item1
              Keys.onPressed: console.log("item1 keys="+event.key)
          }
          Item {
              id: item2
              Keys.onPressed: console.log("item2 keys="+event.key)
          }
      }
      

      Press a key, it asserts with

      ASSERT: "e->isAccepted()" in file items\qquickitem.cpp, line 4490
      

      Same code with a qmlproject (with the qmlscene) works fine.

      Attachments

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

        Activity

          People

            poikelin Joni Poikelin
            agroyer Anthony Groyer
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes