I cannot obtain the size of touch points on Ubuntu 20.04,but the Ubuntu 16.04 is ok.

Asked by zhuhongguo

I cannot obtain the size of touch points on Ubuntu 20.04,but the Ubuntu 16.04 is ok.
The current acquisition method is as follows,
bool GraphicsView::viewportEvent(QEvent *event)
{
QEvent::Type type = event->type();

if(type == QEvent::TouchBegin || type == QEvent::TouchUpdate
|| type == QEvent::TouchEnd){

QTouchEvent *pTouchEvent = static_cast(event);
QList touchPoints = pTouchEvent->touchPoints();

int nId = 0;
QColor penColor;

foreach (const QTouchEvent::TouchPoint tp, touchPoints) {

qDebug() << "id" << tp.id() << "size" << tp.ellipseDiameters() << "position" << tp.pos();
}
return true;
}

return QGraphicsView::viewportEvent(event);

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.