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

Function returning boolean value does not get called when assigned to Triggered handler of Timer QML type

    XMLWordPrintable

Details

    • 15a6f2d10321d37a8, b113df51d348e8711 and 7dfb48cabf1f6fdc0

    Description

      If a function returning boolean value is used in QML code and it is assigned to the Timer's "onTriggered" slot, then it does not get called. Using similar function without return value works normally. This function does not seem to get generated by looking at the generated .cpp code.

      Please find a minimal example which reproduces the issue attached.

      Steps to reproduce:
      1) Build the attached project with Qt for MCUs 2.2 desktop Kit and run the application
      2) Click anywhere on the rectangle in order to start the two timers.

      Expected behavior:
      Both functions are called in turns and text should change back and forth between "I won't change!" and "I changed!"

      Current behavior:
      Only the other function gets called and Text changes only to "I changed!"

      As a workaround, e.g. one can create empty "if" statement and then function gets called. This is commented out in the example, uncomment to see the expected behavior.

      Attachments

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

        Activity

          People

            taarnipuro Timo Aarnipuro
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes