access to canvas items

"Frank Grenzel" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.qt
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Hi! 
If have a canvas(view) with some items of sprites and text (CanvasSprite 
and CanvasText). 
How can I change the text? With 

QCanvasItemList list = canvas()->collisions(e->pos()); 
   if ( !list.isEmpty() ) {
      QCanvasItem* item = list.first(); 
      // some code 
   } 

I can found and select the item touched by the mouse. But now I only have 
access to the CanvasItem Members like move. But I need to access text() 
and setText(), which is no element of QCanvasItem. 

To store some data with the sprite items I've written a subclass of 
QCanvasSprite, called MyCanvasSprite. Now I con store and read some 
informations like name or numbers to sprites. 
But I habe the same problem to access them like to access the text on 
text items. 

Any ideas to slove this problems (sorry, I'm a newbie on C++ and Qt)? 

Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.