[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    question about QSignalMapper
From:       chauchot.etienne () free ! fr
Date:       2006-07-30 9:51:45
Message-ID: 1154253105.44cc81312deb8 () imp5-g19 ! free ! fr
[Download RAW message or body]

Hi everyone,
I can't manage to make QSignalMapper work, could anyone tell me what I am doing
wrong? Here is my source code:

        QSignalMapper *actionsMapper = new QSignalMapper(this);
        connect(actionsMapper, SIGNAL(mapped(const QString&)), this,
SLOT(slotActionActivated(const QString&)));
        KActionCollection *actionCollection = new KActionCollection(this);

                KAction *act = new KAction(
                "cmd",
                Qt::Key_Backspace,
                actionsMapper,
                SLOT(map()),
                actionCollection);
                connect(act, SIGNAL(activated()), actionsMapper, SLOT(map()));
                actionCollection->insert(act);
                actionsMapper->setMapping(act, "cmd");

void explorer::slotActionActivated(const QString& cmd)
{
}

The problem is that in debug mode, slotActionActivated is never entered in...


Thx
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic