Score:0

I can't get the area of touch point in Ubuntu 20.04

gb flag

I can't get the area of touch point in Ubuntu 20.04, but I can get the area of touch point in Ubuntu 16.04; What shall I do? Previous methods are 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<QTouchEvent*>(event);
    QList<QTouchEvent::TouchPoint> touchPoints = pTouchEvent->touchPoints();

    int nId = 0;
    QColor penColor;

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

        qDebug() << "id" << tp.id() << "触摸区域" << tp.ellipseDiameters() << "触摸点" << tp.pos();
    }
    return true;
}

return QGraphicsView::viewportEvent(event);

}

HuHa avatar
es flag
Check the Qt versions on both systems and if that feature is available in both versions.
guiverc avatar
cn flag
You mention two Ubuntu operating systems (20.04 & 16.04), but have tagged the question as being about Ubuntu Touch (the phone OS) so please correct or clarify your question. Ubuntu-Touch is a UBports OS that currently is still 16.04 based (the 20.04 port isn't yet completed).
zhuhongguo avatar
gb flag
The Qt versions on both systems are same.
guiverc avatar
cn flag
The Qt5 versions in *xenial* and *focal* vary greatly and are not the same.
zhuhongguo avatar
gb flag
We use Qt5.15.2 on ubuntu (20.04 & 16.04.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.