samirg
1st September 2007, 02:10
Dear folks,
I have several threads running in sequence, each thread creates new QDialog object, and
closes/hides this dialog object when thread finishes.
Each time a QDialog object is created and displayed by thread, this dialog object takes away editing 'focus' from me/user.
e.g., 10 threads are running, and at same time I am editing a document. It interrupts me 9
times. I have to grab focus back from QDialog 9 times while I am editing, and it is very annoying. I don't want QDialog to take away focus from me while I am editing.
I looked at some previous discussions and tried to set focusPolicy as
setFocusPolicy(qt.QWidget.ClickFocus)
such that, QDialog widow/widget should grab focus only when I click this widget otherwise not. However, it does not work. I don't know why.
regards,
I have several threads running in sequence, each thread creates new QDialog object, and
closes/hides this dialog object when thread finishes.
Each time a QDialog object is created and displayed by thread, this dialog object takes away editing 'focus' from me/user.
e.g., 10 threads are running, and at same time I am editing a document. It interrupts me 9
times. I have to grab focus back from QDialog 9 times while I am editing, and it is very annoying. I don't want QDialog to take away focus from me while I am editing.
I looked at some previous discussions and tried to set focusPolicy as
setFocusPolicy(qt.QWidget.ClickFocus)
such that, QDialog widow/widget should grab focus only when I click this widget otherwise not. However, it does not work. I don't know why.
regards,