Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
7.0 (Next Major Release)
-
None
Description
Background
During review of changes porting virtual keyboard to declarative types registration, there was a debate whether some semi-public components can be moved from QtQuick.VirtualKeyboard namespace to QtQuick.VirtualKeyboard.Components. Such components are used in the keyboard layouts, which are typically not customized by user applications. In some cases, however, it is possible that custom layouts are provided.
It was agreed that the Components are kept as qmldir-import of QtQuick.VirtualKeyboard until Qt7, where the components will be moved as dependencies. This would mean, that the Qt 6.x would remain backwards compatible, and in Qt7 the users would have to add an explicit
import QtQuick.VirtualKeyboard.Components
to custom layouts.
Special case for EnterKey
Porting to declarative type registration (as opposed to manual type registration) raised a previously hidden conflict in type resolution to surface. The EnterKey type conflicts between:
https://doc.qt.io/qt-6/qml-qtquick-enterkey.html
https://doc.qt.io/qt-6/qml-qtquick-virtualkeyboard-enterkey.html
In a typical keyboard layout, there are following imports:
import QtQuick import QtQuick.VirtualKeyboard import QtQuick.Layouts
Since the implicit import is given lower precedence, EnterKey type is resolved to QtQuick.
This issue was resolved by adding a wrapper QML component for EnterKey to QtQuick.VirtualKeyboard, which imports the EnterKey from QtQuick.VirtualKeyboard.Components, giving the component higher precedence.
Attachments
Issue Links
- relates to
-
QTBUG-121643 qt6-declarative: possible build-time race condition around qmlcachegen
- Closed