The TreeWidget custom item widget thing is a bit limited and the docs say
it is only meant for static widgets. I'm not sure where the line is for
what is ok and what isn't but I suppose that is an issue with a widget that
needs to change color. When I tested it completely standalone from Maya,
using a custom Color Pot type widget I threw together, I get the same
problem. What you have to do is keep the color value in sync with the
item's background color.

https://gist.github.com/justinfx/7381181

Now, even though this works standalone, from within Maya the palette seems
to be preventing it from working. Its just gray and I am not sure why that
is yet.



On Sat, Nov 9, 2013 at 7:38 AM, Macbeth R. <[email protected]> wrote:

> Hi, Im trying to make a list of lights, and Im using attrColorSliderGrp,
> to control the Color attribute of the light, using Nathan Horn method to
> use Maya Widget into Pyqt (http://nathanhorne.com/?p=381), the aproach
> works fine when adding it to an QHBoxlayout, or any other container, but
> when added to a QTreeWidgetItem with QtGui.QTreeWidget.setItemWidget(),
> everything works except the color show in the button is always white, but
> when clicked it shows the real color, and you can change it.
>
> (In the Image here, the same objects wich where added
> to qtreewidgetitem appears white, and on the bottom part, they where added
> to an horizontal layout and they show OK)
> http://s12.postimg.org/kal4ffh4t/Screenshot_1.png
>
> I guess something is overriding it, any idea what?? or any other aproach I
> can use to achieve this?
> The main reason why I' m not using a regular button, to call a regular
> colorEditor(or even pyqt color picker
> ), an apply changes to the color attribute of the light, is because I want
> IPR to be refreshing live when browsing trough the color palette, before
> you press OK, can this be achieved trough the api?? or othe suggestions??
>
> Thanks.
>
> Macbeth Rene
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/4a6387c9-b96a-44e4-8890-c651371b69a6%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2sdtp1dzfeA_OGiGT_m3keh9WJDdsx7V0xc9YCcKPRug%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to