qt - Change color of QGraphicsView rubber band -


i know it's possible change color of rubber band rectangle way:

qrubberband rubberband = new qrubberband(qrubberband::rectangle, this);  qpalette pal; pal.setbrush(qpalette::highlight, qbrush(qt::white)); rubberband->setpalette(pal); 

but here way achieve rubber band, rendered qgraphicsview when rubberbanddrag mode active? or in "global scope"?

i'm sorry wrote question, i've looked solution long time, , nothing. few minutes after asking, found solution setting stylesheet. i'm sharing it.

just go designer of qt creator, click on canvas (qgraphicsview). in "qwidget" part find "stylesheet", edit it, , put like:

selection-background-color: rgba(255, 255, 255, 128); 

that's :-). thanks.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -