Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > QT hell....

Reply
Thread Tools

QT hell....

 
 
socket
Guest
Posts: n/a
 
      08-06-2003
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
 
Reply With Quote
 
 
 
 
Mike Wahler
Guest
Posts: n/a
 
      08-06-2003
socket <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
 
Noah Roberts
Guest
Posts: n/a
 
      08-06-2003

> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments