[PyKDE] rubberbanding a QCanvas (demo code)

Boudewijn Rempt boud at valdyas.org
Wed May 15 20:43:01 BST 2002


On Wednesday 15 May 2002 14:39, Andrew Dalke wrote:

> So, umm, how do real GUI programmers do rubberbanding?  And lassoing?
> I suppose I should look at QIconView's code for the first...
>

I might not be how real GUI programmers do that -- I wouldn't know either --
but it looks pretty smooth and easy to comprehend.

> And I guessed at a function for how much to move the mouse during
> the autoscrolling.  Any pointers to a more standard algorithm which
> provides the expected response?  Plus, lassoing calls for movement
> of the canvas *before* the mouse gets to the edge, since otherwise
> you don't know what you're lassoing.
>

Looking at QIconView might be a good idea, or the code of 
Killustrator^WKontour. Especially the file SelectTool.cc. A cursory glance
seems to tell me there's no fundamental difference between their approach
and yours. But I haven't done an in-dept study :-).

-- 
Boudewijn Rempt | http://www.valdyas.org




More information about the PyQt mailing list