Search code examples
c++qtfocusmayaqgraphicsview

Remove blue focus border around QGraphicsView


In Qt (for a Maya plugin), I have a QSplitter containing 2 QGraphicsViews. One of these QGraphicsViews contains some QLineEdits.

Whenever I click on one of these QLineEdits, it gets a blue border (focus), but the QGraphicsView gets a blue border too. How to avoid the QGraphicsView to get a blue border ? enter image description here


Solution

  • You can try setting style sheet eg:

    QGraphicsView:focus {
    border: none;
    outline: none;
    }