Hey all. I am a newb to Qt/C++ programming. I have created a widget with three pixmaps. I am trying to attach an onmousemove event to one of the pixmaps so it will move along the x-axis when the onmousemove event is active.

in the onmousepress event i set :
Qt Code:
  1. dragPosition = event->globalPos() - frameGeometry().topLeft()
To copy to clipboard, switch view to plain text mode 
and
Qt Code:
  1. event->accept()
To copy to clipboard, switch view to plain text mode 


in the onmousemove event:
i check to see if the
Qt Code:
  1. pixmap.rect().contains(dragposition)
To copy to clipboard, switch view to plain text mode 
and then i do
Qt Code:
  1. pixmap.rect().moveCenter(dragPosition.x())
To copy to clipboard, switch view to plain text mode 
then finally i do:
Qt Code:
  1. update(pixmap.rect())
  2. event->accept()
To copy to clipboard, switch view to plain text mode 


everything compiles fine, but when i run it nothing happens. i have thrown a messagebox in to make sure the contains() was being captured onmousemove. it was, so i am stuck. any help would be appreciated.