try

int qAlpha ( QRgb rgba )

Qt Code:
  1. bool GuiButton::hitButton ( const QPoint & pos ) const
  2. {
  3. //QColor mcolor = icon().pixmap(iconSize()).alphaChannel().toImage().pixel(pos);
  4.  
  5. if ( qAlpha (icon().pixmap(iconSize()).alphaChannel().toImage().pixel(pos))== 0)
  6. return false;
  7. else
  8. return true;
  9.  
  10. }
To copy to clipboard, switch view to plain text mode