Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
After https://codereview.qt-project.org/c/qt/qtdeclarative/+/622429, users who have their own text editing context Menu will only see that, despite the built-in ContextMenus added to TextField and TextArea in https://codereview.qt-project.org/c/qt/qtdeclarative/+/612253. Thanks to deferred execution, those menus should also never be created.
Users who just don't want these ContextMenus can also do the following in a QML file and reuse that throughout their app:
TextField {
ContextMenu.menu: null
}
However, there are two issues I see with this:
- The attached object is created regardless of whether the user actually uses ContextMenu. TextArea and TextField are controls that could potentially be created in large numbers, so this will result in increased memory usage (an extra QObject per control).
- There is no convenient way to disable this with a global flag.
If we make the currently private TextEditingContextMenu (name can be discussed) type public, we can create this from C++, as we do for ToolTip.
Attachments
Issue Links
- relates to
-
QTBUG-35598 QtQuick Controls TextField and TextArea miss mouse context menu
-
- Closed
-