[Interest] Can't receive released/clicked correctly from touch screen

nus1998 nus1998 at yeah.net
Sun Sep 30 04:47:33 CEST 2018


Hi All,


Sorry there are something wrong in my email client, so I repost it:


I'm testing on a dialog with a touch screen, for mouse event, sometimes there is only "pressed" event, or only "released" and "clicked" events. but when checking the touch event, each timeTouchBegin and TouchEnd events are received.
I have tried set Qt::AA_SynthesizeMouseForUnhandledTouchEvents but doesn't work.


The source code is very simple, I just generate a project using dialog guide, and drag a PushButton on the dialog, with the code below:



#include"dialog.h"
#include"ui_dialog.h"
#include"QDebug"


Dialog::Dialog(QWidget*parent):
QDialog(parent),
ui(newUi::Dialog)
{
ui->setupUi(this);


connect(ui->pushButton,&QPushButton::clicked,[=](){
qDebug()<<"clicked";
});


connect(ui->pushButton,&QPushButton::pressed,[=](){
qDebug()<<"pressed";
});


connect(ui->pushButton,&QPushButton::released,[=](){
qDebug()<<"released";
});
}


Dialog::~Dialog()
{
deleteui;
}


PS: the Qt version is 5.9.6 with linuxfb platform.
B.R.
Nus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180930/37fa7761/attachment.html>


More information about the Interest mailing list