0

I have a very basic setup.

A main dialog window made with:

dialog = QtGui.QDialog()

Then a couple commands to set it visible:

dialog.setFocus(True) 
dialog.show()
dialog.raise_()
dialog.activateWindow() 
app.exec_()

One of this dialog window widgets has a right-click menu connected. The problem:

A right-clicking on a QtGui.QDialog dialog window (app) does not make it "current" or "active"...

Example Situation: With two app windows open on a screen both placed side-by-side: a web browser on a left and my QtGui.QDialog app on a right. The web browser is currently active (or "in focus"). Moving a mouse over the QtGui.QDialog app. Right-clicking on QtGui.QDialog does not make it active. I would have to left-click on QtGui.QDialog in order to make it active. Question: How can I get a left-click functionality (in term of making the window active) with a right click.

Many thanks in advance!

alphanumeric
  • 17,967
  • 64
  • 244
  • 392
  • do you perform any action on right-click event on the child widget? and if you do, does that action work? there are two possible cases, 1) when you click on the child widget and 2) when you click outside of child widget, in which case the dialog is not getting focused? – qurban Dec 05 '13 at 19:16
  • The situation is occurring on Mac only. It works just fine on Windows. I did a couple more tests with other app windows. And it appears a right-click does not make any app window active. – alphanumeric Dec 05 '13 at 19:20
  • @Sputnix. I think you may have answered your own question there. This seems to be an issue with the specific OS/Window-Manager you are using rather than with Qt. – ekhumoro Dec 05 '13 at 19:25
  • This question probably belongs on [super-user](http://superuser.com/), but similar questions have already been asked there before, e.g. [this one](http://superuser.com/q/292895) and [this one](http://superuser.com/q/27306). – ekhumoro Dec 05 '13 at 19:31

0 Answers0