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

List:       kde-devel
Subject:    Re: QListView tooltips
From:       Don Sanders <dsanders () cch ! com ! au>
Date:       1999-08-14 10:33:35
[Download RAW message or body]

From: Ralf Nolden <Ralf.Nolden@post.rwth-aachen.de>
> I have a question regarding QListView and tooltips - Anyone who knows M$
> suff will likely have experienced that a list view shows a small
> rectangle containing the contents of a list item if the full length
> cannot be shown on the right end.  

Yes it is a very nice feature, I think I will want to do a similar thing myself
in the not too distant future though I haven't achieved this yet.

>Is there a way to get this to work
> with QListView as well ?  For now we only made some dynamic tooltips but
> these show up any time, independent of the visibility of the item...

I don't understand what you mean by show up any (all the?) time. Surely the
whole point of the QToolTip::maybe method is to give you control over whether a
tooltip should/shouldn't be shown. I use QToolTip::maybeTip to allow the user to
choose whether or not they wish to show tooltips in an app. (Just return from
QToolTip::maybeTip without calling QToolTip::tip).

Getting the tooltip rectangle in the right place is another matter, I haven't
played with this but QToolTip::tip does take a rectangle as a parameter so it
might be possible. (I guess the QT tooltip example does this), you'll also need
to determine if the string in the QListView overflows the column I guess
QPainter::boundingRect is the way to go here.

One strange thing I've noticed about tooltips is that the erroneously appear
even if a child window (right terminology?) of a window covers the tipping
window, weird.

Interested to know if you get this working.

BFN,
Don.

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

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