Thank you for the reply, here is what I have so far and it's still not working,
void MainWindow::on_pushButton_3_clicked() //testing button
{
ui->lineEdit_2->setInputMask("hhhhhhhhhhhhhh");
QString input
= ui
->lineEdit_2
->text
();
bool ok;
char command=input.toInt(&ok,16);
serial->write(command,sizeof(command));
}
void MainWindow::on_pushButton_3_clicked() //testing button
{
ui->lineEdit_2->setInputMask("hhhhhhhhhhhhhh");
QString input = ui->lineEdit_2->text();
bool ok;
char command=input.toInt(&ok,16);
serial->write(command,sizeof(command));
}
To copy to clipboard, switch view to plain text mode
and also is there a method to input as many as hex pairs as I want? Since setinputmask restricts my input to only that many that I set. Thank you.
Bookmarks