View Full Version : how to do this ,mouse pressed,then can move the window
tsuibin
2nd April 2009, 18:39
how to do this ,
mouse pressed anywhere on the window,
then can move the window
Hiker Hauk
2nd April 2009, 18:45
Implement the 2 methods below for your derived class from QWidget.
virtual void mouseMoveEvent ( QMouseEvent * event )
virtual void mousePressEvent ( QMouseEvent * event )
e.g.
in moursePress, set a flag,
in mouseMove, if flag set, move the window by calculating how much mouse is moved.
spirit
2nd April 2009, 19:04
read this (http://labs.trolltech.com/blogs/2009/03/20/moving-top-level-window-by-dragging/).
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.