Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9.0 FF
-
-
214369f75 (6.9)
Description
Steps to reproduce:
- Build either qtquickview_java or qtquickview_kotlin (the multiview version)
- Click on the "QML Button signal disconnect" button
- Click on the upper "CHANGE COLOR" button
Expected:
Color doesn't change
Actual:
Color changes
This is because both QMLContents get statusChangeListeners:
m_firstQmlContent.setStatusChangeListener(this) m_secondQmlContent.setStatusChangeListener(this)
...and onStatusChanged gets executed twice - on both times we make a connection to the First QML Views onClicked() signal and after that nothing can be done to disconnect the first one.
You can also see this when clicking on the "CHANGE COLOR" button once:
2025-02-04 14:05:28.090 5516-5516 myTag com.example.qtquickview_kotlin I QML button clicked 2025-02-04 14:05:28.091 5516-5516 myTag com.example.qtquickview_kotlin I QML button clicked
Both listeners log the click.
Attachments
For Gerrit Dashboard: QTBUG-133483 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
625323,4 | Qt Quick for Android: Implement new onStatusChanged in examples | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |