[Qt-interest] QGraphicsItem > setFocus() not working ?
Patric
userqt at gmail.com
Mon Aug 24 01:46:40 CEST 2009
I have found my mistake.
Apparently these items are not focusable by default.
Damn it...
----- Original Message -----
From: Patric
To: qt-interest at trolltech.com
Sent: Monday, August 24, 2009 2:33 AM
Subject: QGraphicsItem > setFocus() not working ?
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/8217d729/attachment.html
More information about the Qt-interest-old
mailing list