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 <QBitmap>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include <QMouseEvent>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
@ -138,6 +139,13 @@ void ToolTip::showEvent(QShowEvent *e)
|
|||||||
d->preview->setInfo();
|
d->preview->setInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToolTip::mouseReleaseEvent(QMouseEvent* event)
|
||||||
|
{
|
||||||
|
if (rect().contains(event->pos())) {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ToolTip::ToolTip()
|
ToolTip::ToolTip()
|
||||||
: QWidget(0)
|
: QWidget(0)
|
||||||
, d( new Private )
|
, d( new Private )
|
||||||
|
@ -50,7 +50,8 @@ public:
|
|||||||
Plasma::Widget *currentWidget() const;
|
Plasma::Widget *currentWidget() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *);
|
||||||
|
void mouseReleaseEvent(QMouseEvent *);
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *);
|
void resizeEvent(QResizeEvent *);
|
||||||
void paintEvent(QPaintEvent *);
|
void paintEvent(QPaintEvent *);
|
||||||
|
Loading…
Reference in New Issue
Block a user