[Qt-interest] QGraphicsItem > setFocus() not working ?

Patric userqt at gmail.com
Mon Aug 24 01:33:01 CEST 2009


Hi guys, 
I really hate this one... 
Here is my code : 

QGraphicsPixmapItem *item = new QGraphicsPixmapItem();
scene->addItem(item);

item->setFocus();

bool hasFocus = item->hasFocus();  // hasFocus() returns false





The code is quite simple. I don't know why setFocus() is not working for me. Any ideas ? 

I'm working on Windows XP, QT 4.5.1, QTCreator 1.2 . 



Regards, 

Patric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090824/a2299024/attachment.html 


More information about the Qt-interest-old mailing list