On Sat, Apr 18, 2015 at 2:36 PM Panupat Chongstitwattana <panup...@gmail.com>
wrote:

> Hi
>
> How do you make a code block Justin?
>

You mean the email-formatted code blocks? A few of us are using that
Markdown-Here browser plugin:
http://markdown-here.com/

You just mark up a block with

```[optional lang]
code code code
```

And hit the button :-)


> I would like to throw in what I found updating my script to PySide in the
> flowlayout. The example that comes with PySide itself was using some
> deprecated method too. The setMargin
>
> if parent is not None:
>     self.setMargin(margin)
>
>
> The new one is setContentsMargins which takes 4 arguments for margin of
> each side. Just my quick silly fix.
>
> if parent is not None:
>     self.setContentsMargins(margin, margin, margin, margin)
>
>
> the margin() method is deprecated too, so need to change this.
>
> 2 * self.margin()
>
> to this
>
> 2 * self.getContentsMargins()[0]
>
>
>
>
>
>
> On Saturday, April 18, 2015 at 4:58:30 AM UTC+7, Justin Israel wrote:
>>
>> Hey there,
>>
>> I found the reason it was showing up strangely under PySide. It is
>> because the code was using a now deprecated method, on QTableWidgetItem. In
>> the "showAttributes()" method, you need to change this line:
>>
>> item.setBackgroundColor(QtGui.QColor(40,40,40))
>>
>> ​
>> to
>>
>> item.setBackground(QtGui.QBrush(QtGui.QColor(40,40,40)))
>>
>> ​
>> It was still valid in PyQt4, but in PySide has been changed. For me, I
>> got a warning printing out in the Script Editor. Basically the loop would
>> crash while setting up the attributes, so you ended up with a partially
>> constructed channel box.
>>
>> Justin
>>
>  --
> 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/864aa775-25da-476e-bad6-0fe4bd097d57%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/864aa775-25da-476e-bad6-0fe4bd097d57%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/CAPGFgA1iWmfYki2riT9%2Bw3UVcfhNFUoOXE1835M-FnDjW7K2zQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to