[PyKDE] Event chaining and passing parameters
David Boddie
david at boddie.org.uk
Thu Sep 16 13:18:25 BST 2004
On Wed, 15 Sep 2004 13:54:04, Timothy Grant wrote:
> I have QListView that connects to a context menu (QPopupMenu) and
> passes the item(s) to my showPopup method.
>
> The QActions that populate the QpopupMenu then call their own
> processing methods.
You might need to post some code that shows what you're doing.
> My problem is that I don't know how to pass the QListViewItem(s) from
> my showPopup method further down the call chain so that say the
> editMethod knows which items need to be edited.
>
> I guess consisely put it is "How do I pass state data along the Event
> call chain?"
With signals and slots you can find out which object emitted the signal
by calling self.sender() in the slot that receives it. You might be able
to record this somewhere visible to your editMethod, although you don't
say which object would have this method.
If you post some fairly concise example code, we can probably work something
out.
David
___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the PyQt
mailing list