How to grab the gesture for a particular component



  • I have QPushButton which is placed in a QWidget. I want to grab the gesture only for the QPushbutton.
    I tried,

    @grabGesture(Qt::TapAndHoldGesture).@

    this grabs the gesture for the whole Widget and not for the QPushButton alone. Then i tried it in this way,

    @ui->PushButton->grabGesture(Qt::TapAndHoldGesture).@

    but this doesn't grabs anything. so can anyone please help me how to grab the Gesture for a particular component.



  • I have the same problem now. Did you solve it?
    Thank you.



  • I have the same problem now. Did you solve it?
    Thank you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.