By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,131 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,131 IT Pros & Developers. It's quick & easy.

QT hell....

P: n/a
Hello :)
Im having a bit of difficulties to understand how QT event hooking
works, im trying to figure out an example from trolltech's QT tutorial
(http://doc.trolltech.com/3.1/tutorial1-02.html)

Im having trouble with this line:

QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );

What is SIGNAL() ? a macro?
It gets clicked() as a parameter, what for?
my reason says clicked() returns a value of some const that represents
an event but when looking on clicked() defenition i see that it
returns void:

void QButton::clicked () -
http://doc.trolltech.com/3.1/qbutton.html#clicked

So what's going on? how does it work? please help me understand :)
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
socket <so********@yahoo.com> wrote in message
news:64**************************@posting.google.c om...
Hello :)
Im having a bit of difficulties to understand how QT event hooking
works, im trying to figure out an example from trolltech's QT tutorial
(http://doc.trolltech.com/3.1/tutorial1-02.html)

Im having trouble with this line:

QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );

What is SIGNAL() ? a macro?
It's whatever the authors of QT defined it to be.
Read the documentation.
It gets clicked() as a parameter, what for?
Whatever the authors of QT define its purpose to be.
Read the documentation.
my reason says
Don't use 'your reason', read the documentation.
I see you already have the link for that.

clicked() returns a value of some const that represents
an event but when looking on clicked() defenition i see that it
returns void:

void QButton::clicked () -
http://doc.trolltech.com/3.1/qbutton.html#clicked

So what's going on? how does it work? please help me understand :)


How it works should be described in the documentation.
If you still don't understand, check to see if QT has
a mailing list or newsgroup or other support resources.

None of this has anything to do with the ISO standard
C++ langauge, the topic here.

-Mike

Jul 19 '05 #2

P: n/a
How it works should be described in the documentation.
If you still don't understand, check to see if QT has
a mailing list or newsgroup or other support resources.

NNTP Server: nntp.trolltech.com
Group: t.qt-interest

These are NNTP access points for the qt-interest email list.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.