View Full Version : Question about window focus.

9th February 2016, 13:23
Good day!

I have a QMainWindow with 3 buttons inside, lets call it window1. When i click on button1, for example, it opens a QDialog window. The problem is when i click any one of these buttons and this QDialog opens, i cannot access window1 again to open the others QDialog through those others buttons!

How can i change that?

9th February 2016, 13:30
How You open this QDialog ? You must do it with show not with exec.

9th February 2016, 13:31
Sounds like you are opening the dialog as a "modal" dialog, meaning it prevents user interaction with its parent (Window modality) or any other window of the application (application modality).

Usually QDialog is non-modal, so you either set the modality or you are calling QDialog::exec().


9th February 2016, 15:56
Yes, i was using exec(). I'll change to show().