ui->lineEditEvents_->installEventFilter(this);
bool MainWindow::eventFilter(QObject *watched, QEvent *event){ if (watched == ui->lineEditEvents_) { auto ev = dynamic_cast<QKeyEvent*> (event); if (ev) { ui->labelEvents_->setText(ev->text()); } }}
void __fastcall TForm1::Edit1KeyPress(TObject *Sender, System::WideChar &Key){ this->Label1->Caption=Key;}