avoid cells for being moved on drag (this is going to be a problem for grid view sorting)

This commit is contained in:
Luis Ángel San Martín 2014-11-02 23:35:56 +01:00
parent 36c9ac804f
commit 6ea4fe155d

View File

@ -38,11 +38,13 @@ Rectangle {
Rectangle {
id: realCell
property int position : 0
Drag.active: mouseArea.drag.active
Drag.hotSpot.x: 32
Drag.hotSpot.y: 32
Drag.dragType: Drag.Automatic
Drag.mimeData: { "text/plain": "comic" }
Drag.mimeData: { "text/plain": titleText.text }
Drag.proposedAction: Qt.CopyAction
width: 156; height: 287
@ -53,6 +55,12 @@ Rectangle {
MouseArea {
id: mouseArea
drag.target: realCell
drag.minimumX: 0
drag.maximumX: 0
drag.minimumY: 0
drag.maximumY: 0
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onDoubleClicked: {
@ -87,6 +95,7 @@ Rectangle {
comicsSelectionHelper.selectIndex(index)
grid.currentIndex = index;
}
}
//Menu emits the 'main' signals
@ -159,6 +168,7 @@ Rectangle {
//title
Text {
id : titleText
anchors { top: realCell.top; left: realCell.left; leftMargin: 4; rightMargin: 4; topMargin: 234; }
width: 148
maximumLineCount: 2