focusInEvent not call for QLineEdit
Hi,
I have a subclassed QLineEdit added to a GraphicsScene and a focusInEvent associated to it.
However the focusInEvent is never called. I tried adding an event filter, but without success.
.h
Code:
{
Q_OBJECT
public:
myQLineEditClass();
virtual ~myQLineEditClass() {};
protected:
};
.cpp:
Code:
{
MGlobal
::displayInfo(MQtUtil
::toMString(QString().
sprintf("EVENT FILTER")));
if (event
->type
() == QEvent::FocusIn) {
return true;
}
return QObject::eventFilter(obj, event
);
}
{
MGlobal
::displayInfo(MQtUtil
::toMString(QString().
sprintf("FOCUS IN")));
}
{
MGlobal
::displayInfo(MQtUtil
::toMString(QString().
sprintf("FOCUS OUT")));
}
/.../
myQLineEditClass *qledit=new myQLineEditClass(oneNode);
scene()->addWidget(qledit);
qledit->installEventFilter(oneNode);
However neither EVENT FILTER, nor FOCUS IN, nor FOCUS OUT are ever called with I double-click on the QLineEdit. How come ?
Thanks.