Hi to all I need to select a region over my waveform display so someone suggested to me to use QRubberBand. I tried it and it works but I would change the selection color to transparent red so I found in internet this class

Qt Code:
  1. class WfRubberBand : public QRubberBand
  2. {
  3. public:
  4.  
  5. WfRubberBand( Shape s, QWidget * p = 0 ) : QRubberBand( s, p )
  6. {
  7. QPalette palette;
  8. //palette.setBrush( QPalette::WindowText, QBrush( Qt::red ) );
  9. palette.setBrush( QPalette::Foreground, QBrush( Qt::red ) );
  10. setPalette(palette);
  11. }
  12.  
  13. protected:
  14.  
  15. virtual void paintEvent( QPaintEvent * )
  16. {
  17. QStylePainter painter(this);
  18.  
  19. option.initFrom( this );
  20.  
  21. painter.drawControl(QStyle::CE_FocusFrame, option);
  22. }
  23. };
To copy to clipboard, switch view to plain text mode 

I tested it and effectively it draw a red rectangle but filled and not transparent so I added this line
Qt Code:
  1. setWindowOpacity( 0.0 );
To copy to clipboard, switch view to plain text mode 
without any effects.

How can I do to have a transparency?
May be should I use composition instead of rubberband?
Best Regards,
Franco