View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#3
Originally Posted by coderus View Post
onPressed: timer.start()
onReleased: timer.stop()
onCancel: timer.stop()
timer.onTriggered: view.closeTab(index)
Perfect!, I was fairly close with one of my attempts, but you have succeeded where I failed (again) and all with less code than I had applied.

Eventually........

Code:
        MouseArea {
            anchors.fill: root
            propagateComposedEvents: true
            onPressed: {
                timer.start();
            }
            onReleased: {
                timer.stop();
            }
            Timer {
                id: timer
                interval: 500
                onTriggered: {
                    view.closeTab(index)
                }
            }
        }
......this will evolve

Thanks again, coderus

Regards,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following 2 Users Say Thank You to Markkyboy For This Useful Post: