Uwe first of all thanks for your help, It definitely helps !
I wont say that I was not expecting that hehe, something was not looking good!
However I have to say that even like that the performance of what you propose is still incomparable to the usual QRubberBand. With smooth movement of the mouse its still bit laggy compared to violent and fast movements of the mouse and the QRubberBand is keeping up.
Additionally, using this I can not set a different QBrush color for the painter but I can only change the opacity.
This is not overly impoartant as i am kind of OK with not having different colors but I just wanted to get the usual rubberband colors which seems to be
// Pen
// Brush
QColor dimHighlight
= QColor(qMin
(highlight.
red()/2 + 110,
255), qMin
(highlight.
green()/2 + 110,
255), qMin
(highlight.
blue()/2 + 110,
255));
// Pen
QColor highlight = this->plot->canvas()->palette().color(QPalette::Active, QPalette::Highlight);
// Brush
QColor dimHighlight = QColor(qMin(highlight.red()/2 + 110, 255), qMin(highlight.green()/2 + 110, 255), qMin(highlight.blue()/2 + 110, 255));
To copy to clipboard, switch view to plain text mode
Thanks for your help again, its really appreciated !
Xerion
Bookmarks