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

List:       pykde
Subject:    Re: [PyQt] com.apple.xbs Error-- Please help- Thank you
From:       David Cortesi <davecortesi () gmail ! com>
Date:       2017-03-28 18:38:34
Message-ID: CALyzANuKEzttpe5ePC5sXB_m4UptjzK65LMTjz==8Ju8DeLixg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


exitButton.setMenuRole( QAction.QuitRole )


To understand what is happening with the menubar read this page and the
> MenuRole.
>
> http://doc.qt.io/qt-5/qaction.html
>

Good pointer! However I added the line

    exitButton.setMenuRole( QAction.QuitRole )

to the appropriate place in the test program and also changed the text of
exitButton from 'Exit' to 'Quit', and the behavior didn't change; running
under the Python interpreter the app menu Quit item is still "Quit Python".
Possibly if the script were bundled by e.g. PyInstaller so the actual
executable is no longer the CPython interpreter, it might work. I don't
have enough interest to make that experiment.

[Attachment #5 (text/html)]

<div dir="ltr">exitButton.setMenuRole( QAction.QuitRole )<br><div \
class="gmail_extra"><br><div class="gmail_quote"><br><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"> To understand what is happening with the menubar \
read this page and the MenuRole.<br> <br>
<a href="http://doc.qt.io/qt-5/qaction.html" rel="noreferrer" \
target="_blank">http://doc.qt.io/qt-5/qaction.<wbr>html</a><br></blockquote><div><br></div><div>Good \
pointer! However I added the line<br><br>      exitButton.setMenuRole( \
QAction.QuitRole )<br> <br></div><div>to the appropriate place in the test program \
and also changed the text of exitButton from &#39;Exit&#39; to &#39;Quit&#39;, and \
the behavior didn&#39;t change; running under the Python interpreter the app menu \
Quit item is still &quot;Quit Python&quot;. Possibly if the script were bundled by \
e.g. PyInstaller so the actual executable is no longer the CPython interpreter, it \
might work. I don&#39;t have enough interest to make that \
experiment.<br><br></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