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 :
dragPosition = event->globalPos() - frameGeometry().topLeft()
dragPosition = event->globalPos() - frameGeometry().topLeft()
To copy to clipboard, switch view to plain text mode
and
event->accept()
event->accept()
To copy to clipboard, switch view to plain text mode
in the onmousemove event:
i check to see if the
pixmap.rect().contains(dragposition)
pixmap.rect().contains(dragposition)
To copy to clipboard, switch view to plain text mode
and then i do
pixmap.rect().moveCenter(dragPosition.x())
pixmap.rect().moveCenter(dragPosition.x())
To copy to clipboard, switch view to plain text mode
then finally i do:
update(pixmap.rect())
event->accept()
update(pixmap.rect())
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.
Bookmarks