Results 1 to 2 of 2

Thread: QTimer

  1. #1
    Join Date
    May 2007
    Qt products

    Question QTimer

    Hi friends,

    i am programing on QT4.2.3 with a crossplatform of VC++

    i need a help in the programing i am doing.

    i have object in a plane which is to be move from one position to the other when i click on the button start like from the initial ponint to the final point. and ever time it make a move the object should be displayed.

    below is the function.

    Void Way::moveObject()

    while(pxSquare->x() < 200 || pxSquare->y() >0) //does not exceed the plane
    pxSquare->setPos(pxSquare->x() + 4, pxSquare->y() - 4);
    //onclick moves a step
    pxSquare->x() + 4; // incremants x value
    pxSquare->y() - 4; //decremnts y value

    however when i run this the object directly shows the fnal position,
    n what i want is every time it makes a move it should be diaplyed on the plane. where in i can increase n decreese the speed of the object..

    thanks in advance

  2. #2
    Join Date
    Feb 2006
    Oslo, Norway
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTimer

    J-P Nurmi

Similar Threads

  1. Simple QTimer help
    By philips in forum Qt Programming
    Replies: 14
    Last Post: 6th July 2015, 09:39
  2. Replies: 5
    Last Post: 6th March 2007, 06:34
  3. QTimer based Splash Screen
    By bpetty in forum Newbie
    Replies: 6
    Last Post: 15th December 2006, 01:51
  4. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 13:54
  5. QTimer issue
    By qball2k5 in forum Qt Programming
    Replies: 1
    Last Post: 31st March 2006, 19:14


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.