Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt for MCUs 2.2.2
-
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.