From pykde Fri Jan 25 10:02:02 2008 From: Phil Thompson Date: Fri, 25 Jan 2008 10:02:02 +0000 To: pykde Subject: Re: [PyQt] Creating an action with a "verbose" signal Message-Id: <200801251002.02856.phil () riverbankcomputing ! com> X-MARC-Message: https://marc.info/?l=pykde&m=120125589614714 On Friday 25 January 2008, Martin Höfling wrote: > Hi all, > > I am a bit confused how to realize the following, any hint's are welcome: > > What I have is a menu, this menu should be filled with all executable > scripts in a directory. On menu selection, the selected script should be > executed. So far so good. > > Here come's the problem: For each file i create a QAction object, add this > to the menu and connect it's "triggered()" signal with a python function > blubb. The problem is to distinguish from which QAction/File blubb has been > called. > > Any hint's how to solve this? QObject.sender() or QSignalMapper or Connect to a lambda function that calls blubb with the action as an argument. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt