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
2009-08-01 17:43:21