tags:

views:

646

answers:

2

When i click Qlineedit i want the focus and at the same time i want to edit for multiple linedits for using virtual keyboard.

A: 

Subclass QLineEdit and implement QWidget::focusInEvent(QFocusEvent *); and set a global variable to the current linedit and use that from your virtual keyboard.

ex (not real code) :

void myLineEdit::focusInEvent ( QFocusEvent * ) {
     myapp->currentLineEdit = this;
 }
 //virtual keyboard 
 if(myapp->currentLineEdit) abuse(myapp->currentLineEdit);
OneOfOne
A: 

Thanks for reply OneOfOne... If i click Qlineedit , i want to fire a signal(like signal fires when we click Qpushbutton).. How can i do that.. Thanks in advance..