can traits distinguish the event from ui editor and program code?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

can traits distinguish the event from ui editor and program code?

joel kim
Hi,

Can I distinguish the Traits event from ui editors and program code like pyqt?
The pyqt library provides two difference event handler for most events.
For example, the lineedit widget can the following two signals:

---------------------------------------------------------------------------------------------------------
1. void textChanged (const QString&)
This signal is emitted whenever the text changes. The text argument is
the new text.
Unlike textEdited(), this signal is also emitted when programmatically
setting the text via setText().

2. void textEdited (const QString&)
This signal is emitted whenever the text is edited. The text argument
is the next text.
Unlike textChanged(), this signal is not emitted when programmatically
setting the text via setText().
---------------------------------------------------------------------------------------------------------

Thanks in advance,

Joel.
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: can traits distinguish the event from ui editor and program code?

bryce hendrix

No, traits only has a change event. If you need to get other events, you can hook up a handler, get the qt control and setup the listerer for the signal

Bryce

On Aug 18, 2010 10:31 PM, "Doh-Hyoung Kim" <[hidden email]> wrote:

Hi,

Can I distinguish the Traits event from ui editors and program code like pyqt?
The pyqt library provides two difference event handler for most events.
For example, the lineedit widget can the following two signals:

---------------------------------------------------------------------------------------------------------
1. void textChanged (const QString&)
This signal is emitted whenever the text changes. The text argument is
the new text.
Unlike textEdited(), this signal is also emitted when programmatically
setting the text via setText().

2. void textEdited (const QString&)
This signal is emitted whenever the text is edited. The text argument
is the next text.
Unlike textChanged(), this signal is not emitted when programmatically
setting the text via setText().
---------------------------------------------------------------------------------------------------------

Thanks in advance,

Joel.
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev