touch event - how to get TouchEvent in Qt environment with Laptop touchPad? -
touch event - how to get TouchEvent in Qt environment with Laptop touchPad? -
i want touchevent in qt, programme doesn't work, help me? , os ubuntu 14.04 , win7, qt library 4.8.6, qt creator 3.2.1. give thanks you.
mymainwindow::mymainwindow(qwidget *parent) : qmainwindow(parent) { _uicls::setupui(this); setattribute(qt::wa_accepttouchevents); // has setattribute } bool mymainwindow::event(qevent *evt) { qdebug()<<evt->type(); // can't touchevent switch(evt->type()) { case qevent::touchbegin: qdebug()<<"touch begin"; evt->accept(); homecoming true; case qevent::touchupdate: qdebug()<<"touch update"; homecoming true; case qevent::touchend: qdebug()<<"touch end"; default: homecoming _basecls::event(evt); } }
qt touch-event touchpad
Comments
Post a Comment