Hi

I want to set the color of pushButton to transparent.
(button background color)
I tried using setColor() to change "QPalette::Button" .
But following build error occured.


" invalid conversion from 'QPalette*' to 'QRgb' "
"initializing argument 1 of 'QColor::QColor(QRgb)' "

How can I resolve this error.

Qt Code:
  1. palette = new QPalette();
  2. palette->setColor(QPalette::Button , QColor(0,0,0,0) );
  3. pushButton = new QPushButton(centralwidget);
  4. pushButton->setPalette(QPalette(palette));
  5. pushButton->setObjectName(QString::fromUtf8("pushButton"));
  6. pushButton->setGeometry(80, 220, 140, 140);
  7. pushButton->setIcon(QIcon(QPixmap("icon.png")));
  8. pushButton->setIconSize(QSize(140 , 140));
To copy to clipboard, switch view to plain text mode 


regards
John