Results 1 to 9 of 9

Thread: Why QCursor setPos() dosen't work here?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Why QCursor setPos() dosen't work here?

    wysotas question is well in place - however, your program is not moving the cursor:
    Qt Code:
    1. if (key == Key_Up)
    2. {
    3. posTmp=pCursor->pos()+posUp;
    4. pCursor->setPos(0,0); //<<<<<-------you always set position 0,0
    5. cout<<pCursor->pos().rx()<<" "<<pCursor->pos().ry()<<endl;
    6. }
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. The following user says thank you to high_flyer for this useful post:

    ker98k (30th May 2007)

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
  •  
Qt is a trademark of The Qt Company.