Yes, I’ve seen this too. Using CSS, some widgets require that you re-define
not just individual elements, but the entirety of the widget and all of its
children. So what’s happened here is that all elements of the menu forgot
about any default styling as soon as you apply a stylesheet to the parent
QMenu. I don’t think there’s any way to style just one element, I’ve always
resorted to re-styling the whole thing, so if you find any, let me know!

On Fri, 3 May 2019 at 18:28, kiteh <kiteh.0...@gmail.com> wrote:

> Hi all,
>
> I am trying to implement a right-arrow in my QMenus and as soon as I did
> that, it seems to have screw up my checkboxes?
>
> https://media.giphy.com/media/W0cTSdMJ0f0xDq7Xx9/giphy.gif
>
> The checkboxes you are seeing in the gif are actually QAction objects.
> Wondering if anyone has experience this before and/or if this is a Maya/Qt
> issue (I couldn't tell which is which) or if this could be one of the
> instance where Maya does not plays nicely with Qt?
>
> I am using the following line of code to set the right-arrow in my QMenu
> subclass:
> self.setStyleSheet("QMenu::right-arrow{image:url(add.png);}")
>
>
> --
> 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/7e29642a-2dbb-4dd2-a2de-e2621c4e7b61%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/7e29642a-2dbb-4dd2-a2de-e2621c4e7b61%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/CAFRtmODUiNrvC9KtDUC64epQy0X2FS%3D9-7deESQ4%3DYYZMpyLzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to