summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/preview.cpp6
-rw-r--r--rbutil/rbutilqt/preview.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/preview.cpp b/rbutil/rbutilqt/preview.cpp
index 72af37deee..5006a03a09 100644
--- a/rbutil/rbutilqt/preview.cpp
+++ b/rbutil/rbutilqt/preview.cpp
@@ -79,8 +79,7 @@ PreviewLabel::PreviewLabel(QWidget * parent, Qt::WindowFlags f)
void PreviewLabel::mouseMoveEvent(QMouseEvent * event)
{
hovertimer.start();
- mousex = event->globalX();
- mousey = event->globalY();
+ mousepos = event->globalPos();
}
void PreviewLabel::enterEvent(QEvent * event)
{
@@ -95,7 +94,8 @@ void PreviewLabel::leaveEvent(QEvent * event)
void PreviewLabel::timeout()
{
- preview->move(mousex-(preview->width()/2) ,mousey-(preview->height()/2));
+ preview->move(mousepos.x() - (preview->width() / 2),
+ mousepos.y() - (preview->height() / 2));
preview->setVisible(true);
}
diff --git a/rbutil/rbutilqt/preview.h b/rbutil/rbutilqt/preview.h
index 4c51cb8031..5e43c2d9ac 100644
--- a/rbutil/rbutilqt/preview.h
+++ b/rbutil/rbutilqt/preview.h
@@ -66,8 +66,7 @@ private slots:
private:
QTimer hovertimer;
- int mousex;
- int mousey;
+ QPoint mousepos;
PreviewDlg* preview;
};