[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/devtools/icemon/src
From:       André Wöbbeking <Woebbeking () web ! de>
Date:       2006-09-27 16:40:36
Message-ID: 1159375236.937743.12250.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 589108 by woebbe:

tooltips, yeah :-)

Does anyone know how to get the icon into the tooltip?

 M  +2 -8      starview.cc  


--- trunk/playground/devtools/icemon/src/starview.cc #589107:589108
@@ -485,14 +485,8 @@
     QPoint p ( static_cast<QHelpEvent*>(e)->pos());
 
     HostItem *item = 0;
-    QList<QGraphicsItem*> items = m_canvas->items( p );
-    QList<QGraphicsItem*>::ConstIterator it;
-    for( it = items.begin(); it != items.end(); ++it ) {
-        if ( dynamic_cast<HostItem*>(*it) ) {
-            item = static_cast<HostItem *>( *it );
-            break;
-        }
-    }
+    if ( QGraphicsItem* graphicsItem = m_canvasView->itemAt( p ) )
+        item = dynamic_cast<HostItem*>( graphicsItem->parentItem() );
     if ( item ) {
         HostInfo *hostInfo = item->hostInfo();
         if ( !hostInfo ) return QWidget::event(e);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic