1

I have a ctrl+f dialog and when I press the window, it causes the main window to lose focus. Is there a way to have both windows have focus?

user2638731
  • 595
  • 2
  • 15
  • 28

1 Answers1

0

Kind of, but not really. Only one window can claim focus on the desktop/operating system level. You want this to be your application or main PyQT object. Then, what you want to do is define a new window type (QObject) that will be treated like a toolbox/dialog within the parent application. This will set a child-like focus attribute. Your application will retain focus on the desktop level, and now you have another inner-focus attribute for windows spawned from within your app.

QtGui QStyleOptionToolBox

StackOverflow: pyqt popup window

Community
  • 1
  • 1
blakev
  • 4,154
  • 2
  • 32
  • 52