From 19674f64699ba883f24a97a04505ca2c7f12634e Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 17 Oct 2010 12:48:20 +0200 Subject: Implemented hovering in FilesystemWidget Hovering over dirs and pictures show either the content of the directory or a scaled image of the picture. This is a strange commit, though. When the archive was the last opened tab the program crashes when changing to FilesystemView. I don't have the slightest clue, why, so I simply removed setting the last opened tab on startup. Also there is some strange behavior regarding the position of the HoverWindow and what Qt thinks the global position is... --- filestreewidget.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'filestreewidget.cpp') diff --git a/filestreewidget.cpp b/filestreewidget.cpp index 1181c21..dad3724 100644 --- a/filestreewidget.cpp +++ b/filestreewidget.cpp @@ -295,6 +295,9 @@ bool FilesTreeView::event(QEvent *e){ } QModelIndex curIdx; QHoverEvent *hEvent = static_cast(e); + if(!hEvent){ + return true; + } QPoint hotSpot(hEvent->pos().x(), hEvent->pos().y() - SmGlobals::instance()->cursorOffset()); QPoint globalPos = mapToGlobal(hotSpot); QPoint where = globalPos + QPoint(30, 0); -- cgit v1.2.3-70-g09d2