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

List:       pykde
Subject:    [PyQt] menu items not working on windows: activated vs triggered
From:       Lee Harr <missive () hotmail ! com>
Date:       2011-09-19 19:30:38
Message-ID: SNT106-W7482034037BAE9574B783B10B0 () phx ! gbl
[Download RAW message or body]


I maintain an application written using PyQt
(pynguin.googlecode.com)

The other day I received a bug report saying that almost
none of the menu items were working on windows.

The user would click on the menu item and there would
be no error message, just nothing would happen, like
the menu item was not connected.

On my system (ubuntu linux) the menus worked fine.


Today I found a windows computer I could play around
with and when I looked at the ui file in the Qt Designer
there, all of my menu items showed in the Signal/Slot
editor as connected to signal activated(), but as soon
as I would click on one to see what other signals are
available, activated was no longer an option.

Once I set them all to signal triggered() the menu items
work normally. Seems to work properly on linux as well.


So, just a heads up. Make sure you don't select activated()
for your QAction menu items. Choose triggered() instead.

 		 	   		  
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://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