I could solve my problem like that:

Thanks

Qt Code:
  1. QColor color = ui.l1_le->palette().color(ui.l1_le->backgroundRole());
  2. //QMessageBox::information(this,"LernIT",QString::number(a));
  3.  
  4.  
  5.  
  6. if (color == "#ffff00")
  7. insert();
  8.  
  9.  
  10. else
  11. solve();
To copy to clipboard, switch view to plain text mode