[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] [Bug] PyQt5 version 5.7.0 OS X.11.4 (El Capitan) MenuBar requires defocus + refocus of app to
From:       Maxwell Grady <max.grady () gmail ! com>
Date:       2016-09-22 17:03:28
Message-ID: CAG9=XhkYzUkr_PD60VwqrHkDEKP0L8rUXvgOOvL-ORcV-6gm6g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I have a PyQt5 v 5.7.0 app that is cross platform and functioning fine on
Windows 10 and Ubuntu 16.04 however on OS X there is a problem with the
menubar.

When the app is started on OS X, the menubar at the top of the screen
(native menubar location) appears but can not be clicked. Keyboard
shortcuts still work but clicking the menu has no result. If you switch
focus to another program (Cmd+Tab) and then switch focus back to the PyQt
app (Cmd+Tab) then the menu is clickable and functions as normal.

Instead of linking you to my app I have provided a minimum working example:
A blank window (QWidget) with a menubar that has one menu and one item
added to it.
The item simply triggers a method to print("Test ...") and is set to Cmd+t
keyboard shortcut.

Upon launching the program you can see a File menu appears, you can press
cmd+t and it triggers the method to print to sys.stdout, however you can
not click on the File Menu.

If you click your desktop then click back to the app window then suddenly
the File menu fucntions properly.

The code for the minimal working example is listed in a GithubGist here:

https://gist.github.com/mgrady3/8168da3869869ec11a281103014300c8

-Maxwell
-- 
University of New Hampshire
Department of Physics
Pohl Group
DeMeritt Hall 119
---
Síocháin agus Grá

[Attachment #5 (text/html)]

<div dir="ltr">I have a PyQt5 v 5.7.0 app that is cross platform and functioning fine \
on Windows 10 and Ubuntu 16.04 however on OS X there is a problem with the \
menubar.<div><br></div><div>When the app is started on OS X, the menubar at the top \
of the screen (native menubar location) appears but can not be clicked. Keyboard \
shortcuts still work but clicking the menu has no result. If you switch focus to \
another program (Cmd+Tab) and then switch focus back to the PyQt app (Cmd+Tab) then \
the menu is clickable and functions as normal.</div><div><br></div><div>Instead of \
linking you to my app I have provided a minimum working example:</div><div>A blank \
window (QWidget) with a menubar that has one menu and one item added to \
it.</div><div>The item simply triggers a method to print(&quot;Test ...&quot;) and is \
set to Cmd+t keyboard shortcut.</div><div><br></div><div>Upon launching the program \
you can see a File menu appears, you can press cmd+t and it triggers the method to \
print to sys.stdout, however you can not click on the File \
Menu.</div><div><br></div><div>If you click your desktop then click back to the app \
window then suddenly the File menu fucntions properly.</div><div><br></div><div>The \
code for the minimal working example is listed in a GithubGist \
here:</div><div><br></div><div><a \
href="https://gist.github.com/mgrady3/8168da3869869ec11a281103014300c8">https://gist.github.com/mgrady3/8168da3869869ec11a281103014300c8</a><br \
clear="all"><div><br></div><div>-Maxwell</div>-- <br><div \
class="gmail_signature"><div dir="ltr"><div>University of New \
Hampshire</div><div>Department of Physics</div><div>Pohl Group</div><div>DeMeritt \
Hall 119</div><div>---</div>Síocháin agus Grá</div></div> </div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic