PDA

View Full Version : Preventing blue focus rectangle



MrGarbage
20th December 2007, 19:40
Hi,

I have a QTabWidget placed on a dialog with
several other controls. It has been requested
that the QTabWidget not show the blue focus rectangle
when it's border is clicked.

I have set the focus policy to setFocusPolicy(Qt::NoFocus)
but that has no effect.

How can I accomplish this and why does the setFocusPolicy()
not accomplish this?

Many Thanks!

mchara
21st December 2007, 06:37
hi,
are you sure that rectangle comes from tabWidget? you can have focusPolicy set on one of "page" widgets. Is this rectangle inside of page? (i remember that in my app tabWidget showed focus on current tab's label not on whole tab widget)

MrGarbage
21st December 2007, 15:36
You are correct. The focus rectangle was actually coming from a QScrollArea on the page.