Reputation: 31
What is this
in the following QT function call?
connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
I know the background of this
in C++ but what is this
pointing to in this function call?
Upvotes: 0
Views: 1994
Reputation: 5067
In this example you are connecting:
with:
This is most likely the object in which the connect line's code is located.
To answer your question, you need to check and see what object is being created in the code that contains the connect call.
Upvotes: 0
Reputation: 8895
this
is more like a C++ question than Qt's one, If you dont know what it means, go and read some more about C++ rather than study Qt.
See this about this
Upvotes: 0
Reputation: 258618
this
points to the current object. The method is called from a member function.
Upvotes: 2