[PyKDE] Passing argument in QPopupMenu.insertItem(QString, reveiver)

Maciej Paszta paszczi at go2.pl
Mon Mar 15 22:54:00 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I have a following problem. I create QPopupMenu and then I insert some 
item. All items should have the same receiver but passing him different 
arguments.

chat = QPopupMenu(self)
chat.insertItem('Open 1', self.open)
chat.insertItem('Open 2', self.open)
chat.insertItem('Open 3', self.open)

def open(self, a0)
	.....

So I want to pass for example 1, 2 or 3 to self.open according to which item 
was selected... Is there any way I can do it, or maybe some workaround is 
needed
- -- 
Maciek "paszczi" Paszta .::. paszczi at go2.pl .::. JID:macp at chrome.pl
gg: 2810043 .::. Linux User #304533 .::. BLUG Member #0247
fingerprint: A484 C4D8 9CC7 2DA3 2F92  E68A 9056 D5CC F22E 4C89
PGP:pgp.mit.edu .::. MPlayerPL Team : mplayerpl.emdej.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAViXpkFbVzPIuTIkRAkc0AJ98bUt76tLEkn6Vv2216SkvOFx6nACeNnnC
zSPyX8LX2c9aX2QEXteJqdQ=
=YPyA
-----END PGP SIGNATURE-----




More information about the PyQt mailing list