Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-56

Property changed signal not sent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • Qt for MCUs 2.0
    • Qt for MCUs 1.9
    • QML, QUL Team
    • Build with Qt for MCUs 1.9 and run on Ubuntu 20.04.
    • Linux/X11
    • d109dce5c2b100e77441b2c10994cd700530919b
    • Sprint 3.7/2022, Sprint 4.1/2021

    Description

      The changed signal for a QML property is not always emitted.

      Example :
      The console.log("output", output) is not printed when pressing Qt.Key_S
      unless we enable console.log("Set input. Output was", propertyTest.output).

      // main.qml

      import QtQuick 2.15
      
      Item {
          id: root
          width: 240
          height: 220
       
          PropTest {
              id: propertyTest
              onOutputChanged: console.log("output", output)
          }
      
          Keys.onPressed: {
              console.log("Key", event.key)
              if (event.key === Qt.Key_S) {
                  //console.log("Set input. Output was", propertyTest.output)
                  propertyTest.input = propertyTest.input + 1
              }
          }
      }

      // PropTest.qml

      import QtQuick 2.15
      Item {
          readonly property int output: input
          property int input: 0
      }
      

      Attachments

        1. main.qml
          0.4 kB
        2. PropTest.qml
          0.1 kB

        Activity

          People

            paosmacz Patryk Osmaczko
            dmhbl Daniel Mattsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: