Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0 Beta1, 6.5.0 Beta2, 6.6.0
-
None
-
-
d99afad40 (dev), 29a063284 (6.5)
Description
Beginning with the Qt6.5 Beta1 release (prior 6.5.0-0-202212201419, "dev" release was not affected by this bug) as well as the Qt6.6 "dev" release (6.6.0-0-202212210709), code that formerly was portable between Qt5 and Qt6 now breaks due to
import QtQuick 2.12
Giving a runtime error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:31:13: "PinchHandler.onScaleChanged" is not available in QtQuick 2.12.
Which is clearly a bug since "PinchHandler" and its "scale" property were available as far back as Qt5.12. This ends up breaking code that was formerly portable for all Qt versions from 5.12 to 6.5 (at least up to "dev" release 6.5.0-0-202212201419, which didn't have this regression).
Changing the import statement to:
import QtQuick
allows the code to work as intended with Qt6.5 and Qt6.6. However since the code requires portability between Qt5 and Qt6, removing the version number from the import statement breaks Qt5 compilation.
Enclosed is an example program qqc2-quick-import-bug.tgz to demonstrate this problem.