Hi friends,
i tried to change the text color of the QComboBox using QPalette ...

Qt Code:
  1. comboBox->setAutoFillBackground(true);
  2.  
  3.  
  4. ComboBod::SelectedIndex(int index)
  5. {
  6. QPalette comboPalette = palette();
  7. if(index == 1)
  8. {
  9. comboPalette.setColor(QPalette::Text, Qt::green);
  10. comboPalette.setColor(QPalette::WindowText, Qt::green);
  11. }else
  12. {
  13. comboPalette.setColor = parentWidget()->palette();
  14. }
  15.  
  16. comboBox->setPalette(comboPalette);
  17. }
To copy to clipboard, switch view to plain text mode 

but its not reflecting any change in the color ... i tried stylesheets also but not able to change the text of the comboBox .. only selection window text is changing ...

please hlp me ..

Thanks in advance