Qt - arguments in signal-slots
        Posted  
        
            by bullettime
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by bullettime
        
        
        
        Published on 2010-03-12T19:25:30Z
        Indexed on 
            2010/03/12
            19:27 UTC
        
        
        Read the original article
        Hit count: 363
        
qt
|signals-slots
I have a QPushButton, QDateEdit and another custom object. I want to connect the button to the date edit object in a way that when I click the button, the date edit object will change its set date to a date defined on the custom object. Kinda like this:
connect(pushbutton,SIGNAL(clicked()),dateedit,SLOT(setDate(custom_object.getDate())));
but I can't do that. Apparently, the connect statement doesn't specify what's the information being passed from the signal to the slot, only the type of the information being passed. Is there a way to do this without having to create a new class?
© Stack Overflow or respective owner