PDA

View Full Version : Tooltip-like widget



momesana
4th October 2007, 01:08
Hi. Recently I gave opera a try and discovered a nifty Tab-preview widget that is displayed instead of a tooltip when the mouse is hovering over a tab for a certain amount of time.

1602

What is the correct way to implement this? Maybe creating a parentless widget and manually displaying it at the position retrieved by the QMouseEvent and destroying it upon a leaveEvent or when a key is pressed? The normal tooltips are pretty limited.

Thanx in advance
momesana

marcel
4th October 2007, 07:48
Yes, that would be the way to go.
Tooltips are indeed very limited.

wysota
4th October 2007, 13:25
Using helpEvent would be better. And if you can create a pixmap of the contents you want to display, you can just put it inside a regular tool tip.

momesana
4th October 2007, 16:46
Thank you
I'll try both approaches and see which one best fits the purpose.

jpn
4th October 2007, 19:22
This is exactly what QxtToolTip (http://libqxt.org/static/docs/classQxtToolTip.html) was written for.. ;)

momesana
4th October 2007, 19:33
cool.
Now this is finally a reason to install the Qt Extension Library which I was planning to do anyway :)

Thanx alot