thanks for the reply, I tried with the above statement but it didn't work. I tried with using signals and slots as follows
connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), this, SLOT(setWidgets(QWidget*, QWidget*)));
void TME_COM::setWidgets(QWidget * old, QWidget *newwid)
{
const char* ab;
if(newwid != 0)
{
ab = newwid->metaObject()->className();
qDebug(ab);
if(strcmp(ab,"QLineEdit")==0)
{
qDebug("focus on line edit\n");
virtualkeyboard->show();
}
else
{
virtualkeyboard->hide();
}
}
}
it worked, but I stuck with another problem.
Virtual keyboard is appearing with out title bar.
In virtual keyboard constructor, there is a statement like this
this->setWindowFlags(Qt::Tool);
If I remove this statement, the program is entering infinite loop and if I include the above statement VKB works, but appears without title bar.
I want to display VKB with title bar and it should work fine.
please help me.![]()
Bookmarks