[Qt-interest] Creating a new slot with qtcreator
Alessandro Portale
Alessandro.Portale at trolltech.com
Sat Jun 20 18:48:08 CEST 2009
Svenn Are Bjerkem schrieb:
> I will do that, but maybe some of the more qtcreator savvy users could
> shed some light on how qtcreator wants the user to use slots. Maybe
> complete slot edit is a future feature of qtcreator.
QtDesigner has the feature to add custom signal/slot entries to the
signal/slot list of the toplevel widget. (See the the '+' and '-'
buttons in the signal/slot selection dialog). That makes it possible to
use the signal/slot connection editor with custom signals or slots.
However, the the developer still has to insert the slot manually to the
.cpp and .h of the dialog. I believe that this would already be enough
for You to use only a 'addContact()' slot.
However, *drumroll* :) QtCreator has a (imho very nice but unknown)
feature called "Goto slot". On right click on any (child) widget; it
will let You select a signal and create an auto-connect-slot
('on_foo_bar') in the top level widget code, .h and .cpp.
Alessandro.
More information about the Qt-interest-old
mailing list