×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    44

    QTapSensor wont working correctly

    Hi,

    I am trying to implement QTapSensor in my app . Here is part of my code:

    //declaration of tap sensor
    QTapReading *reading;
    QTapSensor tapSensor;

    //in main constructor
    tapSensor.start();
    reading = tapSensor.reading();
    connect(&tapSensor,SIGNAL(readingChanged()),this,SLOT(readingTapChanged()));

    void MainWindow::readingTapChanged()
    {
    qDebug("asdsadsadsad");
    QTapReading::TapDirection direction = reading->tapDirection();
    if(direction == QTapReading::X)
    {
    widgetPosition++;
    if(widgetPosition > ui->stackedWidget->count())
    widgetPosition = 0;
    }
    else if(direction == QTapReading::X_Neg)
    {
    widgetPosition--;
    if(widgetPosition < 0)
    widgetPosition = ui->stackedWidget->count();
    }

    updateWidget();
    }

    void MainWindow::updateWidget()
    {
    ui->stackedWidget->setCurrentIndex(widgetPosition);
    }

    I am traying to handle slide gestrure to switch between widgets in stacked windget. As u can see I have in slot readingTapChanged() debug note to see whether sensor react to touch. But I have to push the screen very strong to get response. Can somebody help me how to handle tap better?

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: QTapSensor wont working correctly

    Hi

    You try to use low-level API to implement gestures for your app, however Qt provides already made Gestures framework for that purpose , please check this article http://doc.qt.nokia.com/4.7-snapshot...-overview.html

    Regards,
    Igor

  3. #3
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QTapSensor wont working correctly

    You may also try to set setProperty("returnDoubleTapEvents", false); as the sensor report only on double tap events by default.

Similar Threads

  1. Autofocus 'correctly' implemented, but not working
    By schrecklichkeit in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2011-01-08, 05:02
  2. view launching is not working correctly in 5th.
    By Nitesh Bhardwaj in forum Symbian User Interface
    Replies: 0
    Last Post: 2008-11-18, 09:37
  3. Key capture not working correctly. Please advise
    By Donnieng in forum Symbian C++
    Replies: 7
    Last Post: 2007-08-03, 06:31
  4. NOKIA PBX 22 and RS232 not working correctly
    By Corrado9 in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-08-28, 04:29
  5. Symbian Install Not Working Correctly
    By MukiEX in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2004-01-17, 21:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •