[Panel-devel] Tooltips for Plasma::Widget's

Dan Meltzer parallelgrapefruit at gmail.com
Mon Dec 17 20:52:11 CET 2007


Hi,

Over the past few days I've been poking at adding tooltips to Widgets
within plasma.  This patch adds that support.  My main focus when
designing them was for the panel, however the code is implemented in
Plasma::Widget so (in theory) any widget can set a tooltip.  I'm not
sure if that sthe best idea however, as this was designed specifically
for the systray and it may look ugly elsewhere.

A few things in particular:
1) The widget show()'s the tooltip at the top left corner of the item,
this would be ugly if it occured on normal plasmoids, but to make the
position configurable could also get ugly.

2) QGraphicsItems do not give off a QHelpEvent for a tooltip.  I've
instead used the hover events for showing and hiding the tooltip, its
quite abrupt at this point as I have not worked much/any on polish, or
any of the cool iCandy(tm) effects that kicker in 3.x had.

3) Layout: It could use some work, I was having trouble getting the
code to paint properly so I just used two labels side by side, which
looks messy as you can probably tell.

Feedback is much appreciated!

Dan,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tooltip.diff
Type: application/octet-stream
Size: 9753 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071217/8b07edad/attachment.obj 


More information about the Panel-devel mailing list