hello, sorry, I'm French so I'm talking with the translator, I want to change the image of a label based on a bool which is elsewhere in my program.
how can I do it???

THANKS

mainwindow.cpp
Qt Code:
  1. m_mainwindowThread.m_label = new QLabel(m_window);
  2. m_mainwindowThread.afficheLabelArret();
To copy to clipboard, switch view to plain text mode 

thread.h
Qt Code:
  1. QLabel *m_label;
  2. void afficheLabelArret();
To copy to clipboard, switch view to plain text mode 

thread.cpp
Qt Code:
  1. void Thread::afficheLabelArret()
  2. {
  3. if (m_threadGainable.labelModeFroid == true) {
  4. m_label ->setPixmap(QPixmap("/home/ludo/Qt/test2/build/images/froid.jpg"));
  5. else if (m_threadGainable.labelModeChauffage == true) {
  6. m_label ->setPixmap(QPixmap("/home/ludo/Qt/test2/build/images/chauffage.jpg"));
  7. } else {
  8. m_label ->setPixmap(QPixmap("/home/ludo/Qt/test2/build/images/abigael.jpg"));
  9. }
  10. }
  11.  
  12. void Thread::run()
  13. {
  14. while (1) {
  15. afficheLabelArret();
  16. }
  17. }
To copy to clipboard, switch view to plain text mode 

I have segfault randomly