[Qt-interest] QPushButton's clicked signal(signal/slot issue)

Ravi_Kalepalli Ravi_Kalepalli at Satyam.com
Wed Apr 8 10:37:20 CEST 2009


Hi everyone,
  I am working on  a media gallery where thumbnails of the pixmaps are set on top of push buttons.When I click any of the pushButtons,
I want that the pixmap set on top of it to be  enlarged.
I am thinking of implementing it this way,whichever button is clicked,the path of the picture on top of it (as QString) will be passed to the resize( ) slot.

But,according to a post I found on the internet-
according to Qt documentation, within the SIGNAL() and SLOT() macros only function signatures are allowed? I.e. you can only say something like

connect(obj1, SIGNAL(sig(int)), obj2, SLOT(slot(int))),

and you cannot say this:

connect(obj1, SIGNAL(sig(int param)), obj2, SLOT(slot(int param))).


So,how do I send  the 'path' info along with the clicked() signal?

I also came across this http://doc.trolltech.com/4.5/qobject.html#sender but couldn't make out much.
Am new to Qt so,hope the question's not too dumb.

Thank you.



DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.




More information about the Qt-interest-old mailing list