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

Calling a C++ slot from QML onActiveFocusChanged crashes under certain conditions

    XMLWordPrintable

Details

    • 7f2c9d716cba375ee3e576513898a39b3f2c39a5

    Description

      I've spent the last 3 hours removing everything in my app to isolate this bug.

      Basically, this code crashes the app:

      import Qt 4.7
      
      ListView {
      	width: 100
      	height: 100
      	model: app.data //QList<QObject*>
      
      	delegate: TextInput {
      		text: modelData.name 
      		height: 20
      		width: parent.width
      
      		onActiveFocusChanged: {
      			if(!activeFocus) {
      				app.addNewProject(); // Slot that adds a new item to the model
      			}
      		}
      	}
      }
      

      Steps to reproduce:

      1. Launch the attached project in QtCreator

      2. Click on any text

      3. Type something

      4. Click 2 or more times on another item

      5. The app will crash

      Attachments

        1. CrashActiveFocus.zip
          2 kB
          Gregory Schlomoff
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            gregschlom Gregory Schlomoff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes