Issue
in my pyqt5 application, I have a QLineEdit that can have its value changed by both typing and pressing buttons that have advanced actions on the QLineEdit's text.
I have done some research and found the setFocusPolicy, but it does not have a permanent focus option, is there a way around this?
edit: by "permanent focus" I mean that the QLineEdit is always in a focus state where one can type into it, but clicking somewhere else or tabbing does not change the focus to a different widget
Solution
musicamante had it right, what I did was add a corresponding *widgetObject*.setFocusPolicy(Qt.NoFocus)
line for each of my widgets that could possibly focus
note: I had this import line specifically for the NoFocus constant
from PyQt5.QtCore import Qt
Answered By - Krayfighter
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.