From 56fb612452b7e1ab55b1771263932f913558a64a Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sat, 6 Jun 2020 00:05:51 +0200 Subject: [PATCH] disable sendbutton while loading --- src/chatmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp index 4bc12f5..53203de 100644 --- a/src/chatmodel.cpp +++ b/src/chatmodel.cpp @@ -593,6 +593,7 @@ void MainWindow::sendChat() { }); movie->start(); ui->sendChatButton->show(); + ui->sendChatButton->setEnabled(false); } else { @@ -601,6 +602,7 @@ void MainWindow::sendChat() { }); movie1->start(); ui->sendChatButton->show(); + ui->sendChatButton->setEnabled(false); } ui->memoTxtChat->clear(); @@ -618,12 +620,14 @@ void MainWindow::sendChat() { QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); movie->stop(); + ui->sendChatButton->setEnabled(true); }else{ QPixmap send(":/icons/res/sendBlack.png"); QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); movie1->stop(); + ui->sendChatButton->setEnabled(true); } }); @@ -649,12 +653,14 @@ void MainWindow::sendChat() { QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); movie->stop(); + ui->sendChatButton->setEnabled(true); }else{ QPixmap send(":/icons/res/sendBlack.png"); QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); movie1->stop(); + ui->sendChatButton->setEnabled(true); }