views:

347

answers:

2

I'm trying to draw a QRubberBand on a QGLWidget. For some reason the area of the rubber band is drawn as opaque and I don't see what's behind it. This kinda beats the purpose of the rubber band as a way to select stuff inside it.
I've seen in docs for QStyleOptionRubberBand that there's an 'opaque' member but I have no idea how to access this in the default style or how to change it.

Anybody ever done this?

A: 

Are you in Vista/Win7 with Areo on? If so, does it work when you turn it off?

EDIT: How about Message #6?

"In the meantime I looked it up in the QT source code, and I noticed that the following will solve my problem: myQRubberBand->setWindowFlags(Qt::ToolTip);"

genpfault
Vista with Areo off.
shoosh
A: 

Hi,

It would be great having any source code ? But here are how I would attempt to fix the problem :

  1. Subclass QRubberBand
  2. Redefine PaintEvent method
  3. call iniStyleOption to activate style options of your choice

Hope it helps !

Matthieu