I use a linedit set focus o it so that its active. Now whatever is typed on keyboard or any such event is recorded. It works fine on my PC but it just spits out garbage when i try on a different PC. Also the reason why suspect QT is because, when i open a notepad and click on it to make the cursor active & then use the rfid reader, it types the data perfectly.
void MainWindow::on_rfid(){
this->ui->lineEdit->show();
this->ui->lineEdit->setFocus();
}
void MainWindow
::on_lineEdit_textChanged(const QString &arg1
) {
txt_browser = arg1;
}
void MainWindow::on_rfid(){
this->ui->lineEdit->show();
this->ui->lineEdit->setFocus();
}
void MainWindow::on_lineEdit_textChanged(const QString &arg1)
{
txt_browser = arg1;
}
To copy to clipboard, switch view to plain text mode
Bookmarks