2

Qt : I have Subclass the Qgraphicsview and handling mouse events and Set the Dragmode as RubberBandDrag

setDragMode(QGraphicsView::RubberBandDrag);

I am getting the rubberband selection but I am not able to customize the rubberband selection color. Please suggest .....

Marco A.
  • 43,032
  • 26
  • 132
  • 246

1 Answers1

2

I guess that will take the system color.

The cleanest way to do it is by subclassing QRubberBand or, better, create your own rubber band as a QWidget containing a QRubberBand (allows you to customize even more the rubber band).

Take look at this question, it made my day sometime ago.

If you are going to write cross-platform code, keep in mind that on recent osX versions cocoa does not draw the size grips, so you have to draw them in your paint event (under #ifdef Q_OS_MAC).

Community
  • 1
  • 1
JuanDeLosMuertos
  • 4,532
  • 15
  • 55
  • 87