Hi,
I have defined a slot for the slider controls valuechanged signal. In that slot I am using a messagebox exec() to display an error message. When i click on slider the error message window opens , but the solt is ggeting called multiple times and the message window pops up many times. How to handle this situation. Code is pasted below
void Vehicle::Speed(int speed)
{
qWarning()<<"VehicleSpeed is :"<<speed;
QMessageBox msgBox;
msgBox.setText("Connection Error.");
int ret = msgBox.exec();
}
Slot defined was Vehicle::Speed. Logs printed are
VehicleSpeed is : 5
VehicleSpeed is : 10
VehicleSpeed is : 15
VehicleSpeed is : 20
VehicleSpeed is : 25
VehicleSpeed is : 30
VehicleSpeed is : 35
Thanks,
Jinu
Bookmarks