PDA

View Full Version : What is the difference between the activated() and triggered() SIGNALs for a QAction?



JimBrown
27th February 2007, 20:52
Hello,

1) What is the difference between the activated() and triggered() SIGNALs for a QAction?

2) Is there a document that lists all of the standard signals and what they do (hopefully giving suggested usage with regard to events)?

Thank you for your time.

jpn
27th February 2007, 21:06
1) What is the difference between the activated() and triggered() SIGNALs for a QAction?
Better use triggered(), because activated() is part of the Qt3 support layer (http://doc.trolltech.com/4.2/qaction-qt3.html) and advised against using in new code. It's there for making porting job between Qt3 and Qt4 easier.



2) Is there a document that lists all of the standard signals and what they do (hopefully giving suggested usage with regard to events)?
Sorry, what do you mean? Signals are documented for every class offering them. Here's an example list of what signals (http://doc.trolltech.com/4.2/qtextedit#signals) QTextEdit offers.

wysota
27th February 2007, 21:06
1) What is the difference between the activated() and triggered() SIGNALs for a QAction?
"activated()" is deprecated and is part of the Qt3Support module. You should use triggered() instead.


2) Is there a document that lists all of the standard signals and what they do (hopefully giving suggested usage with regard to events)?

Hmm... How about http://doc.trolltech.com/latest/gallery.html ? :) The "Main classes" subpage of the docs may be of use to you as well.