setLayout(vLayout);
setAcceptDrops(true);
- // mouse autohide
- setMouseTracking(true);
- mouseTimer = new QTimer(this);
- mouseTimer->setInterval(3000);
- mouseTimer->setSingleShot(true);
- connect(mouseTimer, SIGNAL(timeout()), SLOT(hideMouse()));
}
void VideoAreaWidget::setVideoWidget(QWidget *videoWidget) {
this->videoWidget = videoWidget;
+ videoWidget->setMouseTracking(true);
stackedLayout->addWidget(videoWidget);
}
emit rightClicked();
}
-void VideoAreaWidget::mouseMoveEvent(QMouseEvent * /* event */) {
- // show the normal cursor
- videoWidget->unsetCursor();
-
- // then hide it again after a few seconds
- mouseTimer->start();
-}
-
-void VideoAreaWidget::hideMouse() {
- videoWidget->setCursor(QCursor(Qt::BlankCursor));
-}
-
void VideoAreaWidget::dragEnterEvent(QDragEnterEvent *event) {
qDebug() << event->mimeData()->formats();
if (event->mimeData()->hasFormat("application/x-minitube-video")) {