Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.0 Beta
-
None
-
23f78b6b76fb9350a472485e34857e1a4842e5d3 (qt/qtdeclarative/5.12)
Description
QQuickItem::cursor is not a property - there is only a non-invokable setCursor. So, there is no way from QML to set the cursor on an Item in general - only on MouseArea. But since these particular items are for entering text, and they do allow setting the text cursor position via the mouse, they ought to behave like any other text-input widgets in any other widget toolkit (including Qt's).
Alternatively we could make cursor (or cursorShape) into an Item property, if someone thinks there's something wrong with changing the default cursor suddenly.
The workaround in QtQuick.Controls is to put a MouseArea on top. ( src/controls/TextArea.qml:845) That MA has other uses besides changing the cursor, but in simpler use cases this kind of hack should not be necessary.
Attachments
Issue Links
- relates to
-
QTBUG-57446 QtQuick Controls TextField does not have IBeam Cursor
- Closed
-
QTBUG-14769 Cursor shapes on desktop systems (windows, etc)
- Closed
-
QTBUG-52158 No Qt Quick Items besides MouseArea have a default cursor shape set
- Reported
-
QTBUG-99604 TextArea and TextField don't use IBeamCursor when readOnly and selectByMouse are both true
- Closed
-
QTBUG-104089 TextEdit has wrong cursor shape on hover
- Closed