Hi All,
My problem is somewhat related to the tooltip timeout.

I want to display a tooltip as in Visual Studio while debigging -
The tooltip has +/- button and expands more as the + is hovered on.

I understand that this must be custom widget to behave like a tootip.

What I want to achieve is this -
Say i hover a widget, tooltip is shown. Now I want is if the tooltip is shown for more than 1-2 seconds, it should show some detailed tooltip. This detailed tooltip can be stored in whatsThis of a widget. How do I achieve this ??
One solution is making custom widgets. But this will be tedious and inefficient. Also it cant be merged with some existing code easily.

What I did was - installed a event filter on QApplication. In this event I am checking for QEvent::ToolTip. But the problem is - How do I extract the tooltip for the WIDGET/ACTION that is under the mouse ?? If u use toolBar()->addAction(), Qt adds a push button for it. Now in the filter, I am getting focusWidget() as QPushButton, but am not able to extract the tooltip for this pushbutton.

Any ideas how to do it ?

EDIT : I wish there was a function in Qt like QWidget::setToolTip(QToolTip *); And QToolTip class being something like -
Qt Code:
  1. class QToolTip
  2. {
  3. QWidget * widgetToShow;
  4. QString tooltip;
  5. QString tooltipDetail;
  6. }
To copy to clipboard, switch view to plain text mode