in case a tooltip becomes permanent, allow clicking it away
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760180
This commit is contained in:
parent
834ce37f54
commit
8801af70e5
@ -22,6 +22,7 @@
|
||||
#include <QBitmap>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QTimer>
|
||||
#include <QGraphicsView>
|
||||
@ -138,6 +139,13 @@ void ToolTip::showEvent(QShowEvent *e)
|
||||
d->preview->setInfo();
|
||||
}
|
||||
|
||||
void ToolTip::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (rect().contains(event->pos())) {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
ToolTip::ToolTip()
|
||||
: QWidget(0)
|
||||
, d( new Private )
|
||||
|
@ -50,7 +50,8 @@ public:
|
||||
Plasma::Widget *currentWidget() const;
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *);
|
||||
void showEvent(QShowEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void paintEvent(QPaintEvent *);
|
||||
|
Loading…
Reference in New Issue
Block a user