[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Using QToolTip during mouse drag events
From:       Stephen Allewell <stephen () mirramar ! fsnet ! co ! uk>
Date:       2002-05-03 17:18:14
[Download RAW message or body]

I'm writing a program that draws its contents on the viewport of a
QScrollView in a grid of cells.  Part of the functionality allows the
user to select rectangular regions, which is already working.  However
I would like to give the user some feedback as to how large the
rectangle is, in the form of a tooltip at the mouse position showing
the x,y size of the rectangle.

I have tried adding a QToolTip to the viewport widget limited to the
cell where the mouse is currently located at any given time, I've also
tried subclassing QToolTip within the QScrollView derived class, and
implementing the maybeTip() function.  However the Tooltips are never
displayed while the mouse button is being held down, even without
moving it.

In the first implementation, adding the QToolTip to the viewport, was
correctly adding the tooltips as they would be displayed after
releasing the mouse button and moving back over the cells where they
were added.

Am I going about this the correct way?  or should another method be
used?

Thanks for any help

Steve
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic