⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Is any Auto Repeat function for image in qml?

  • Dear Friends,

    I’m a beginner in qt. I’ve created one image as a button in qml and i need to print the text continuously in text-input if i hold the image. Is there any auto repeat function like in (qt button property). or which way and how can i achieve this. Thanks in advance…:-)

  • you can use the following:
    Image {
    id: imageRect
    signal repeatedClick(variant str);

        anchors.fill: parent
        onPressed: timer.running = true;
        onReleased: timer.running = false;
    Timer {
        id: timer
        interval: 500; running: false; repeat: true
        onTriggered: imageRect.repeatedClick("PrintMe");
    onRepeatedClick: console.log(str);


  • It's working.......!!!!. Thank u favoritas37. Now only i saw this code and implement.

  • thanks favoritas37
    i used it.

Log in to reply