<div dir="ltr">From the documentation of Plasma Applet I've red that I need to run addAssociatedWidget(someWidget) to make the actions work.<div><br></div><div>I've done this:</div><div><br></div><div><div>    //Initialize the plasmoid using an IconWidget</div>

<div>    m_button = new Plasma::IconWidget(this);</div><div>    m_button->setIcon(KIcon("redshift-status-off"));</div><div><br></div><div>    m_layout = new QGraphicsGridLayout(this);</div><div>    m_layout->setContentsMargins(0, 0, 0, 0);</div>

<div>    m_layout->addItem(m_button, 0, 0);</div><div><br></div><div>    m_widget = new QWidget();</div><div>    m_layout->addItem(m_widget->graphicsProxyWidget(), 1, 0);</div></div><div><br></div><div>    addAssociatedWidget(m_widget);</div>

<div><br></div><div>but still doesn't work.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-20 17:01 GMT+02:00 Simone Gaiarin <span dir="ltr"><<a href="mailto:simgunz@gmail.com" target="_blank">simgunz@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div>I'm trying to use the global shortcut that the user can configure from the "Shortcut configuration page" of a plasma applet, to trigger a KAction and let the plasmoid do something.</div>


<div><br></div><div>I've done this</div><div><br></div><div>    //Setup the action</div><div>    m_toggleAction = new KAction("ToggleAction", this);</div><div>    //Add action to the plasmoid action collection</div>


<div>    addAction("ToggleAction", m_toggleAction);</div><div>    m_toggleAction->setGlobalShortcut(globalShortcut());</div><div>    connect(m_toggleAction, SIGNAL(triggered(bool)), this, SLOT(toggle()));</div>


<div><br></div><div>but nothing happens when I trigger the shortcut. Do anyone know what I'm missing?</div><div>Is there any plasmoid that is using the global shortcut feature?</div><div><br></div><div>Thanks</div></div>


</blockquote></div><br></div>