Qt-interest Archive, January 2006
about custom slots
Message 1 in thread
Hi All,
I was trying Qt-4.1. I just wanted to know, how do i
create custom slots using Qt designer? I am having
problem with that.
In Qt3, i used to click "new slots" and was able to
create new slots and add them to existing signals. But
how do i do that here?
__________________________________________
Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
--
[ signature omitted ]
Message 2 in thread
Hello technix88,
It has been my experience that custom slots within designer have become a
no-no.
What you do is create them in your .h file in your sub-class under either:
public slots:
private slots:
protected slots:
depending on your application. Then you use the "connect" function from
QObject to connect your custom slots to whatever signals you may have. See
http://doc.trolltech.com/4.1/signalsandslots.html for examples of how this
works.
I used to depend heavily on designer's custom-slots in 3.3.4 (and
consequently had a bunch of .ui.h files). I couldn't figure out how to
cleanly make it work under designer 4.x. It's really not hard to
sub-class.
--
[ signature omitted ]