Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.7.2
-
None
-
df5c836fe9753e81cda4a30fa27ce7af5e6f9a5f
Description
In addition to MouseArea's onPositionChanged, QtCreator's word completion
also suggests onMousePositionChanged, which apparently does exist but doesn't
work correctly when one expects onPositionChanged (e.g. it's called even
though "mouse.accepted = false" is called in onPressed). If it's an internal
signal it ought to be better hidden, as it is too easy to confuse it with
onPositionChanged.
Run the code below. Press down and drag in the window. because "mouse.accepted = false" is called in onPressed, no printout is expected to the console if the onPositionChanged was used correctly. But because the onMousePositionChanged was used "by mistake" the signal is triggered unexpectedly.
import QtQuick 1.1 Rectangle { width: 640 height: 360 color: "gray" MouseArea { anchors.fill: parent onPressed: mouse.accepted = false onMousePositionChanged: print("onMousePositionChanged") } }
Attachments
Issue Links
- relates to
-
QTCREATORBUG-1973 Some signals are ignored in auto completion.
- Closed