hi friends,
i try to display different color with respect to the input ..

so to set the color value i use three variable rd , gr , bl and i use it as QColor(rd,gr,bl)

using i program as

Qt Code:
  1. p.setColor(QPalette::Background,QColor(rd,gr,bl));
  2. Button->setPalette(p);
  3. 1Button->setPalette(p);
  4. 2Button->setPalette(p);
  5. 3Button->setPalette(p);
  6. 1Label->setPalette(p);
  7. 2Label->setPalette(p);
  8. 1Label->setPalette(p);
  9. 2Label->setPalette(p);
To copy to clipboard, switch view to plain text mode 

here all the labels are displaying the color but
pushButtons are not displaying the background colors ... why?

i enabled the autofillBackground() also ... if it is not possible then there is any other way to change the color effect according to input ie using a variable for setting color ... ?

please help
thanks in advance