Hi all,
I have a widget which contains among others a qwt_thermo element for displaying a signal level. On top of that, I placed a QLabel which contains a pixmap. This pixmap is a red LED turned off. When the signal level exceeds the desired range, I replace the pixmap with the one of a flashing LED.
I update the signal levels every 20 miliseconds. As long as the signal pixmap is not switched, everything runs smoothly but as soon as the pixmap is changed, the thermo elements aren't running smoothly anymore (the LED is flashing correctly).
I load the pixmaps in the constructor of the class, so they are just swapped when necessary.
The thermo level is set in a slot and the pixmap is changed in a different slot.
Should I use QueuedConnection, maybe?
Are there any performance issues I am missing?
Here, the simplified code:
Qt Code:
... peakLimOn=false; ... void LevelWidget::setLevel(double l) { thermoLevel->setValue(l); } void LevelWidget::switchPeakLED(bool on) { if (on!=peakLimOn) { peakLimOn=on; if (on) { ledPeak->setPixmap(*qpxRedLEDOn); } else { ledPeak->setPixmap(*qpxRedLEDOff); } } }To copy to clipboard, switch view to plain text mode
Regards,
Rainer
Bookmarks