Phil Phil - 5 months ago 12
Python Question

Qt on Mac OS X: How to get rid of QListView's blue outline?

I am using a

QListView
with custom background image and I want to get rid of the blue outline-border that appears around QListView on OS X.

I tried styling it with:

border: 0 none;
outline: 0 none;
border-collapse: collapse;


But it still appears.

What do I need to do to get rid of this blue hue?

Answer

This should work:

yourListView->setAttribute(Qt::WA_MacShowFocusRect, false);
Comments