On Wed, Feb 6, 2019, 7:16 AM Fransuzich <francois.bord...@gmail.com> wrote:

> Hello everyone,
>
> I can't figure out how to attach a maya popupMenu to a QlistWidget (or
> QlistView).
>
> It works fine when i attach it to a QFrame for example, but nothing append
> when calling it on a QlistWidget.
> My Pointer to the QlistWidget seems fine to me as it print
> |||testListWidget (and ||frame0 when attaching on a QFrame, and working
> inside hat Qframe).
>
> self.listWdtPointer  = long(shiboken2.getCppPointer(self.listWdt)[0])
>
> self.listWdtPointerFullPathName =
> omui.MQtUtil.fullName(self.listWdtPointer)
>
>                 print self.listWdtPointerFullPathName* ---->
> |||testListWidget*
>
>
> cmds.popupMenu(mm=True,parent=self.listWdtPointerFullPathName)
> cmds.menuItem(rp='N',l='Test')
>
> Has anyone ever experienced that issue ?
>

It could be a few different things. Those multiple ||| characters in the
widget path indicate that you haven't used setObjectName() on the widgets
or layouts above the list widget. In my experience that can cause problems
when trying to mix Qt widgets with Maya UI commands.

Or it could be whatever logic Maya is using to apply the popupMenu cmd to a
widget and it possibly conflicting with a QListWidget already having
context menu logic of its own.


> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/e3f1092b-f301-4dd9-9972-b4e4965d6780%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/e3f1092b-f301-4dd9-9972-b4e4965d6780%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0V-VBAwmh0xGeyJgjmtT3qH7s5-iqN8b98_4dQQDAuDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to