Hi,
I'm trying to make transparent ToolTip that will move text cursor when
it moves.
I use the next code:
CursorShifter::CursorShifter( QWidget * parent )
: QWidget( parent, Qt::ToolTip | Qt::FramelessWindowHint |
Qt::WindowDoesNotAcceptFocus |
Qt::NoDropShadowWindowHint |
Qt::WindowStaysOnTopHint )
, d( new CursorShifterPrivate( this ) )
{
d->init();
}
void
CursorShifterPrivate::init()
{
color = q->palette().color( QPalette::Highlight );
light = lighterColor( color, 75 );
basicSize = qRound( (qreal) FingerGeometry::width() * 0.2 );
timer = new QTimer( q );
q->setWindowModality( Qt::NonModal );
q->setAttribute( Qt::WA_TranslucentBackground, true );
q->setAttribute( Qt::WA_NoSystemBackground, true );
q->setAutoFillBackground( false );
QObject::connect( timer, SIGNAL( timeout() ),
q, SLOT( _q_hideTimer() ) );
}
But I receive black instead of transparent. Look at the picture...
ToolTip
Is it a bug of Qt, or it relevant to my Kubuntu 15.04?
And if anybody know, how to make transparent ToolTip?
Thank you.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest