Code: import QtFeedback 5.0 HapticsEffect { id: activeEffect duration: 500 // in ms intensity: 0.2 // from 0 to 1 with 0.1 step-size running: button.pressed } Button { id: button width: text.width text: "Test" anchors.horizontalCenter: parent.horizontalCenter onClicked: activeEffect.start() }
import QtFeedback 5.0 HapticsEffect { id: activeEffect duration: 500 // in ms intensity: 0.2 // from 0 to 1 with 0.1 step-size running: button.pressed } Button { id: button width: text.width text: "Test" anchors.horizontalCenter: parent.horizontalCenter onClicked: activeEffect.start() }