QT hell....

S

socket

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 :)
 
M

Mike Wahler

socket said:
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
 
N

Noah Roberts

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top