#define TIP_HEIGHT 5
TimeTooltip::TimeTooltip( QWidget *parent ) :
- QWidget( parent ), mInitialized( false )
+ QWidget( parent )
{
setWindowFlags( Qt::Window |
Qt::WindowStaysOnTopHint |
void TimeTooltip::setTip( const QPoint& target, const QString& time, const QString& text )
{
- mInitialized = true;
mDisplayedText = time;
if ( !text.isEmpty() )
mDisplayedText.append( " - " ).append( text );
}
update();
+ raise();
}
void TimeTooltip::show()
{
setVisible( true );
-#ifdef Q_OS_OS2
- // Bring a tooltip on the top
- // Without this, tooltip does not appear on fullscreen
- // from the second fullscreen state change
- if( mInitialized )
- QWidget::raise();
-#endif
+ raise();
}
void TimeTooltip::paintEvent( QPaintEvent * )