Hm, setting it to the "qrc" location (i.e. ":/icons/icon.png") seems to 
work.

All best,
   Rostislav.

On 09/11/2014 20:41, Rostislav Khlebnikov wrote:
> Hi guys,
>
> am I missing something? I applied the patch attached to the bug, but the
> icon is still missing.
>
> I added my icon to the CACHED_RESOURCE_FILES in files.cmake for my
> plugin. The location is, say, "resources/icon.png" and in plugin.xml I have
> <contextMenuAction nodeDescriptorName="mydescriptor" label="My label"
> icon="resources/icon.png" class="MyAction" />
>
> Any ideas on why this might not work?
>
> Thanks,
>     Rostislav.
>
> On 10/07/2014 10:43, Martin Klemm wrote:
>> Hi Sascha,
>>
>> thanks for the answer and sorry for not writing you for so long. I
>> opened a bug report http://bugs.mitk.org/show_bug.cgi?id=17907 and
>> attached the patch file. Is there something else I have to do now? Or
>> will you do the rest?
>>
>> Best regards,
>>
>> Martin
>>
>>
>>
>> On 28.05.2014 18:09, Sascha Zelzer wrote:
>>> Hi Martin,
>>>
>>> I think it just hasn't been done yet. I also don't see a reason for not
>>> doing it. Would you be up for contributing a patch to enable icons in
>>> the context menu?
>>>
>>> Thanks,
>>>
>>> Sascha
>>>
>>> On 05/06/2014 10:37 AM, Martin Klemm wrote:
>>>> Hello,
>>>>
>>>> I was successful in adding a new context menu action to the data manager
>>>> menu:
>>>>
>>>>      <extension point="org.mitk.gui.qt.datamanager.contextMenuActions">
>>>>          <contextMenuAction nodeDescriptorName="Unknown" label="Group"
>>>> icon="resources/grouping_icon.png" class="GroupAction" />
>>>>      </extension>
>>>>
>>>> The action is shown and works as expected, however, the icon is missing.
>>>> In QmitkDataManagerView::CreateQtPartControl(QWidget* parent) the
>>>> context menu extension service is opened to read the descriptor name,
>>>> label, class and icon attribute but is not using the icon to create the
>>>> action:
>>>>
>>>> ...
>>>> if((*cmActionsIt)->GetAttribute("nodeDescriptorName",
>>>> cmNodeDescriptorName)
>>>>          && (*cmActionsIt)->GetAttribute("label", cmLabel)
>>>>          && (*cmActionsIt)->GetAttribute("class", cmClass))
>>>>        {
>>>>          (*cmActionsIt)->GetAttribute("icon", cmIcon);
>>>>          // create context menu entry here
>>>>          tmpDescriptor =
>>>> QmitkNodeDescriptorManager::GetInstance()->GetDescriptor(QString::fromStdString(cmNodeDescriptorName));
>>>>
>>>>
>>>>          contextMenuAction = new QAction( QString::fromStdString(cmLabel),
>>>> parent);
>>>> ...
>>>>
>>>> Is there a reason why the icon is not used?
>>>>
>>>> Best regards,
>>>>
>>>> Martin
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> Is your legacy SCM system holding you back? Join Perforce May 7 to
>>>> find out:
>>>> &#149; 3 signs your SCM is hindering your productivity
>>>> &#149; Requirements for releasing software faster
>>>> &#149; Expert tips and advice for migrating your SCM now
>>>> http://p.sf.net/sfu/perforce
>>>> _______________________________________________
>>>> mitk-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to