Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Multi Touch problem on Symbian^3
Forum Updated to NodeBB v4.3 + New Features

Multi Touch problem on Symbian^3

Scheduled Pinned Locked Moved Game Development
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amir BH
    wrote on last edited by
    #1

    Hi there,

    I'm developing a game for Symbian using Qt & its Graphics View framework.
    Here's my piece of code on event handling :
    (blue & red are two balls using QGraphicsPixmapItem
    @ case QEvent::TouchBegin:
    case QEvent::TouchUpdate:
    case QEvent::TouchEnd:
    {
    QTouchEvent te = static_cast<QTouchEvent>(event);
    QListQTouchEvent::TouchPoint points = te->touchPoints();
    for(int i = 0;i < points.size();i++)
    {
    if(blue->pos().x()-5 < points[i].lastPos().x() && points[i].lastPos().x() < blue->pos().x()+57
    && blue->pos().y()-5 < points[i].lastPos().y() && points[i].lastPos().y() < blue->pos().y()+57
    && points[i].lastPos().x() != 0 && points[i].lastPos().y() != 0)
    {
    blue->setPos(points[i].pos().x(),points[i].pos().y());
    }
    if(red->pos().x()-5 < points[i].lastPos().x() && points[i].lastPos().x() < red->pos().x()+57
    && red->pos().y()-5 < points[i].lastPos().y() && points[i].lastPos().y() < red->pos().y()+57
    && points[i].lastPos().x() != 0 && points[i].lastPos().y() != 0)
    {
    red->setPos(points[i].pos().x(),points[i].pos().y());
    }
    }
    break;
    } @
    I know that the code is not optimized at all and On my device Nokia C7-00 when both balls are moving using this event the second one lags a lot! What should I do???

    Thanks in advance.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved