Results 1 to 6 of 6

Thread: Vibrate Device

  1. #1
    Join Date
    Jan 2011
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Vibrate Device

    Hi All,

    I want to vibrate the device (of course through code not manually) for a variable amount of time whenever a button is clicked. For example Button1_Clicked vibrate for 1sec, if Button2_clicked vibrate for 2sec.

    Any idea how to achieve this.

    Regards,
    Javed Alam

  2. #2
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Vibrate Device

    I have not tested this personally but there is an API (and example) in Qt Mobility for feedback effects, see http://doc.qt.nokia.com/qtmobility-1...t.html#details

  3. #3
    Join Date
    Jan 2011
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Vibrate Device

    Hi Tsp,

    Thanks for the direction. I am new to QT C++ and for some reason i cannot include QFeedbackHapticsEffect. i get an error "QFeedbackHapticsEffect: No such file or directory". Am i missing something here ?

    Kind Regards,
    Javed

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Vibrate Device

    you need to include and link qtmobility first.

  5. #5
    Join Date
    Jan 2011
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Vibrate Device

    Hi All,

    When i run configure in C:\QtMobility\qt-mobility-symbian-opensource-1.1.0\configure.bat file the command prompt opens up and closes in a split second then i see three file getting generated

    .qmake.cache
    Qt Code:
    1. QT_MOBILITY_SOURCE_TREE = C:/QtMobility/qt-mobility-symbian-opensource-1.1.0
    2. QT_MOBILITY_BUILD_TREE = C:/QtMobility/qt-mobility-symbian-opensource-1.1.0
    To copy to clipboard, switch view to plain text mode 

    config.in
    Qt Code:
    1. CONFIG += release
    2. CONFIG_WIN32 += debug_and_release build_all release
    3. QT_MOBILITY_PREFIX = C:/QtMobility
    4. build_unit_tests = no
    5. build_public_unit_tests = no
    6. build_examples = no
    7. build_demos = no
    8. build_docs = yes
    9. build_tools = yes
    10. qmf_enabled = no
    11. !symbian:isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include
    12. isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib
    13. isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin
    14. isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins
    15. isEmpty($$QT_MOBILITY_EXAMPLES):QT_MOBILITY_EXAMPLES=$$QT_MOBILITY_PREFIX/bin
    16. isEmpty($$QT_MOBILITY_DEMOS):QT_MOBILITY_DEMOS=$$QT_MOBILITY_PREFIX/bin
    17. mobility_modules = bearer location contacts systeminfo publishsubscribe versit messaging sensors serviceframework multimedia gallery organizer feedback
    18. contains(mobility_modules,versit): mobility_modules *= contacts
    To copy to clipboard, switch view to plain text mode 

    config.txt
    Qt Code:
    1. 'qmake' is not recognized as an internal or external command,
    2. operable program or batch file.
    3. ... Not found
    To copy to clipboard, switch view to plain text mode 


    I have no idea what to make of this. I have installed Qt Creator 2.0.1 and is Based on Qt 4.7.0 (32 bit) on Windows 7. I have also done all updates using SDK Maintenance Tool.

    All I am trying to do is to #include <QFeedbackHapticsEffect> and use its properties and functions to Vibrate the phone on button click.

    I am stuck here please help.

  6. #6
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Vibrate Device

    What about add path to qmake into PATH?

Similar Threads

  1. Communicating with a USB device in Qt?
    By N3wb in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2011, 10:30
  2. My program on another device
    By Jeneo W. in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2010, 12:16
  3. Qt communicating with USB device
    By jimmydean101 in forum Newbie
    Replies: 6
    Last Post: 2nd March 2010, 17:02
  4. Handheld Device
    By freelyfallers in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2007, 12:48
  5. QDataSream: No Device
    By jonging in forum Qt Programming
    Replies: 5
    Last Post: 20th June 2006, 22:30

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.