完善KB3
This commit is contained in:
@@ -418,6 +418,17 @@ void CommandUI::on_commandClicked()
|
||||
{
|
||||
//qDebug() << "clicked";
|
||||
|
||||
if(m_command == 0)
|
||||
{
|
||||
QMessageBox *msg = new QMessageBox();
|
||||
|
||||
msg->setWindowTitle(tr("Notice"));
|
||||
msg->setText(tr("please set command first ,command :%1").arg(m_command));
|
||||
|
||||
msg->show();
|
||||
return;
|
||||
}
|
||||
|
||||
//找到消息的发送者
|
||||
CommandButton *btn = qobject_cast<CommandButton *>(sender());
|
||||
|
||||
@@ -566,6 +577,8 @@ void CommandUI::commandAccepted(bool flag,uint16_t command,uint8_t result)
|
||||
}
|
||||
}
|
||||
|
||||
m_command = 0;
|
||||
m_name.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
|
||||
#include "Config/Config.h"
|
||||
|
||||
|
||||
|
||||
#include "QMessageBox"
|
||||
namespace Ui {
|
||||
class CommandUI;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user