- if (!updateWidth && !updateHeight) {
- // Default case: There is enough room below and right of the mouse
- // pointer and the tooltip can be positioned there.
- m_fileMetaDataToolTip->move(x, y);
- m_fileMetaDataToolTip->show();
- } else {
- // There is not enough room to show the tooltip at the default position and
- // it must be moved left or upwards. In this case the size hint of the
- // tooltip is not sufficient and the real size must be respected.
- // To prevent a flickering, the tooltip is first opened outside the visible
- // desktop area and moved afterwards.
- m_fileMetaDataToolTip->move(desktop.right() + 1, desktop.bottom() + 1);
- m_fileMetaDataToolTip->show();
-
- const QSize shownSize = m_fileMetaDataToolTip->size();
- const int xDiff = updateWidth ? shownSize.width() - size.width() : 0;
- const int yDiff = updateHeight ? shownSize.height() - size.height() : 0;
- m_fileMetaDataToolTip->move(x - xDiff, y - yDiff);
+void ToolTipManager::showToolTipDelayed(const QPixmap& pixmap)
+{
+ if (QApplication::mouseButtons() & Qt::LeftButton) {
+ return;