diff options
author | Arno <am@disconnect.de> | 2010-10-17 12:48:20 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-10-17 12:48:20 +0200 |
commit | 19674f64699ba883f24a97a04505ca2c7f12634e (patch) | |
tree | 0abe1e00310b625c756a90fea06b42c96d048c0f /filestreewidget.cpp | |
parent | fe9e348cc2ec4990b0c81179b0507f4a1df54c95 (diff) | |
download | SheMov-19674f64699ba883f24a97a04505ca2c7f12634e.tar.gz SheMov-19674f64699ba883f24a97a04505ca2c7f12634e.tar.bz2 SheMov-19674f64699ba883f24a97a04505ca2c7f12634e.zip |
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...
Diffstat (limited to 'filestreewidget.cpp')
-rw-r--r-- | filestreewidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<QHoverEvent*>(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); |