Seite 1 von 1

Event aus Programm auslösen

Verfasst: Mittwoch 11. Februar 2009, 18:42
von rhersel
Ich möchte einen bestimmten Event (treeview 'cursor-changed') aus dem Code heraus auslösen. Geht so etwas überhaupt und wenn ja, wie?

Hintergrund der Frage: der Event 'cursor-changed' macht im Treeview genau was ich brauche, nämlich den nächsten/vorigen Eintrag auswählen. Da ich nicht weiss, wie man das per Code schafft, möchte ich den Event auslösen können.

Verfasst: Mittwoch 11. Februar 2009, 18:50
von ms4py
Wie du den cursor setzen kannst, steht im anderen Thread.
Das müsste diesen Event auslösen.

Verfasst: Montag 16. Februar 2009, 20:10
von jordi
The emit() method causes the object to emit the signal specified by detailed_signal. The additional parameters must match the number and type of the required signal handler parameters. In most cases no additional parameters are needed. for example:

button.emit("clicked")

is all that is required to emit the "clicked" signal for a button. The most common case requiring additional parameters occurs when emitting an event signal; for example:

button.emit("button_press_event", event)
So etwas?