Registered Member
|
Hi. I'd like to write an animation for reordering tasks in my own task applet (Smooth-Tasks). I wonder how I should approach this? I'd like the animation to be something like this:
https://web.student.tuwien.ac.at/~e0427417/images/smooth-tasks-move-item.gif This means I have to animate layout changes (currently I use QGraphicsLinearLayout) so I guess as a best practice I have to implement my own layout, right? That means calculating of all item positions on my own. Is there any framework that helps me calculating such positions (where items have min, max and preferred sizes)? Then I need to draw the dragged item. I could just create a new window and draw the item into this. I tried this but I didn't manage to get mouse move events from somewhere in order to place the item at the correct position under the mouse pointer (I installed eventFilter on the dragged item (QGrapicsWidget) and the drag even source (QWidget) - nothing worked). Also when I move the item(-window) always under the mouse pointer no mouse events are received by the taskbar (the taskbar is covered up!). At least firefox does such a thing when dragging images to a file browser. So it is somehow possible to draw something under the mouse pointer and still send according events to the window that is beneath. Has anyone any idea how to solve this? Is there maybe already some kind of framework for such a thing? After all, menus in Qt 4 applications move exactly the way I want to move my items! How is that done? |
Registered users: Bing [Bot], claydoh, Google [Bot], markhm, rblackwell, sethaaaa, Sogou [Bot], Yahoo [Bot]