QPushbutton highlight why?
-
Hello,
i design an keypad and all works great.
but the last pressed key is marked, selected.
but i dont want this, it looks strange.i dont know what the reason is.
please see the picture at button 4
!http://imageshack.us/a/img849/4412/52502424.jpg(QPsuhButton 4)!
thx for your help
-
Hello,
I would say that is because it's the last button that has the focus (but i might be wrong)
-
Hello,
thanks for your reply.
but how can i change it?thx
-
hi,
sorry i forget som information.
the problem exist overall in my program.
greetigns -
Hi,
i think that you had only to set the value Qt::NoFocus in the focusPolicy property of your QPushButtons.Take a look at this "page":http://qt-project.org/doc/qt-4.8/qwidget.html#focusPolicy-prop, this will be helpful.
-
Currently I got the same issue.
When I set QPushButton::setCheckable(true);
each button after clicking is highlighted, but if i set it to false highlighted is only button on which is currently mouse pointer.
Does anybody know how to completly block that highlight?
I have set also QPushButton::setFocusPolicy(Qt::No Focus), but problem still occurs
Please help. -
Hi,
You can use the setAutoDefault(false) and setDefault(false).