diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bb0089d95..30a894b25 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5274,8 +5274,11 @@ void MainWindow::on_tx6_editingFinished() //tx6 edited QString t=ui->tx6->text().toUpper(); if(t.indexOf(" ")>0) { QString t1=t.split(" ").at(1); + QRegExp AZ4("^[A-Z]{1,4}$"); + QRegExp NN3("^[0-9]{1,3}$"); m_CQtype="CQ"; - if(t1.size()==2) m_CQtype="CQ " + t1; + if(t1.size()<=4 and t1.contains(AZ4)) m_CQtype="CQ " + t1; + if(t1.size()<=3 and t1.contains(NN3)) m_CQtype="CQ " + t1; } msgtype(t, ui->tx6); }