[Qt-interest] mouseMoveEvent

Stephen Jackson spjackson42 at gmail.com
Wed Sep 30 12:26:12 CEST 2009


On Wed, Sep 30, 2009 at 11:10 AM, "Alexander Carôt" wrote:
> Hi all,
>
> the following problem: I have an interface (called JamDesk), which I created with the Designer. The respectiver header file is included into the class. This works out but additionally I want to have a draggable widget on that form. In that context I implemented the mousePressEvent and the mouseMoveEvent first in order to figure the correct mouse coordinates. The click event works but the move event does not and I am not sure in what way I should change the code below. Please note that at that state the event functions contain only cout << Event works << endl;.
>

You probably need to call setMouseTracking(true) on your widget. (See
docs on QWidget.)

-- 
HTH,

Stephen Jackson




More information about the Qt-interest-old mailing list